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