1*47914Sbostic /* 2*47914Sbostic * Copyright (c) 1983 The Regents of the University of California. 3*47914Sbostic * All rights reserved. 4*47914Sbostic * 5*47914Sbostic * Redistribution and use in source and binary forms are permitted 6*47914Sbostic * provided that the above copyright notice and this paragraph are 7*47914Sbostic * duplicated in all such forms and that any documentation, 8*47914Sbostic * advertising materials, and other materials related to such 9*47914Sbostic * distribution and use acknowledge that the software was developed 10*47914Sbostic * by the University of California, Berkeley. The name of the 11*47914Sbostic * University may not be used to endorse or promote products derived 12*47914Sbostic * from this software without specific prior written permission. 13*47914Sbostic * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 14*47914Sbostic * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 15*47914Sbostic * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 16*47914Sbostic */ 17*47914Sbostic 18*47914Sbostic #if defined(LIBC_SCCS) && !defined(lint) 19*47914Sbostic .asciz "@(#)gethostid.c 5.1 (Berkeley) 04/12/91" 20*47914Sbostic #endif /* LIBC_SCCS and not lint */ 21*47914Sbostic 22*47914Sbostic #include "SYS.h" 23*47914Sbostic 24*47914Sbostic .data 25*47914Sbostic hostid: 26*47914Sbostic .long 0 27*47914Sbostic .text 28*47914Sbostic 29*47914Sbostic ENTRY(gethostid) 30*47914Sbostic movl hostid,r0 # check cache 31*47914Sbostic beql doit 32*47914Sbostic ret 33*47914Sbostic doit: 34*47914Sbostic chmk $SYS_gethostid 35*47914Sbostic jcs err 36*47914Sbostic movl r0,hostid # set cache 37*47914Sbostic ret # hostid = gethostid(); 38*47914Sbostic err: 39*47914Sbostic jmp cerror; 40