1*47918Sbostic /*-
247914Sbostic  * Copyright (c) 1983 The Regents of the University of California.
347914Sbostic  * All rights reserved.
447914Sbostic  *
5*47918Sbostic  * %sccs.include.redist.c%
647914Sbostic  */
747914Sbostic 
847914Sbostic #if defined(LIBC_SCCS) && !defined(lint)
9*47918Sbostic 	.asciz "@(#)gethostid.c	5.2 (Berkeley) 04/12/91"
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