147918Sbostic /*- 2*61226Sbostic * Copyright (c) 1983, 1993 3*61226Sbostic * The Regents of the University of California. All rights reserved. 447912Sbostic * 547918Sbostic * %sccs.include.redist.c% 647912Sbostic */ 747912Sbostic 847912Sbostic #if defined(LIBC_SCCS) && !defined(lint) 9*61226Sbostic .asciz "@(#)getdtablesize.c 8.1 (Berkeley) 06/04/93" 1047912Sbostic #endif /* LIBC_SCCS and not lint */ 1147912Sbostic 1247912Sbostic #include "SYS.h" 1347912Sbostic 1447912Sbostic .data 1547912Sbostic dtablesize: 1647912Sbostic .long 0 1747912Sbostic .text 1847912Sbostic 1947912Sbostic ENTRY(getdtablesize) 2047912Sbostic movl dtablesize,r0 # check cache 2147912Sbostic beql doit 2247912Sbostic ret 2347912Sbostic doit: 2447912Sbostic chmk $SYS_getdtablesize 2547912Sbostic jcs err 2647912Sbostic movl r0,dtablesize # set cache 2747912Sbostic ret # dtablesize = dtablesize(); 2847912Sbostic err: 2947912Sbostic jmp cerror; 30