147918Sbostic /*- 2*61226Sbostic * Copyright (c) 1983, 1993 3*61226Sbostic * The Regents of the University of California. All rights reserved. 447914Sbostic * 547918Sbostic * %sccs.include.redist.c% 647914Sbostic */ 747914Sbostic 847914Sbostic #if defined(LIBC_SCCS) && !defined(lint) 9*61226Sbostic .asciz "@(#)gethostid.c 8.1 (Berkeley) 06/04/93" 1047914Sbostic #endif /* LIBC_SCCS and not lint */ 1147914Sbostic 1247914Sbostic #include "SYS.h" 1347914Sbostic 1447914Sbostic .data 1547914Sbostic hostid: 1647914Sbostic .long 0 1747914Sbostic .text 1847914Sbostic 1947914Sbostic ENTRY(gethostid) 2047914Sbostic movl hostid,r0 # check cache 2147914Sbostic beql doit 2247914Sbostic ret 2347914Sbostic doit: 2447914Sbostic chmk $SYS_gethostid 2547914Sbostic jcs err 2647914Sbostic movl r0,hostid # set cache 2747914Sbostic ret # hostid = gethostid(); 2847914Sbostic err: 2947914Sbostic jmp cerror; 30