1 /*-
2  * Copyright (c) 1983 The Regents of the University of California.
3  * All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  */
7 
8 #if defined(LIBC_SCCS) && !defined(lint)
9 	.asciz "@(#)getdtablesize.c	5.2 (Berkeley) 04/12/91"
10 #endif /* LIBC_SCCS and not lint */
11 
12 #include "SYS.h"
13 
14 	.data
15 dtablesize:
16 	.long	0
17 	.text
18 
19 ENTRY(getdtablesize)
20 	movl	dtablesize,r0	# check cache
21 	beql	doit
22 	ret
23 doit:
24 	chmk	$SYS_getdtablesize
25 	jcs	err
26 	movl	r0,dtablesize	# set cache
27 	ret			# dtablesize = dtablesize();
28 err:
29 	jmp cerror;
30