xref: /csrg-svn/lib/libc/vax/sys/cache.lib/fork.c (revision 61226)
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 "@(#)fork.c	8.1 (Berkeley) 06/04/93"
1047912Sbostic #endif /* LIBC_SCCS and not lint */
1147912Sbostic 
1247912Sbostic #include "SYS.h"
1347912Sbostic 
1447912Sbostic 	.globl	mypid, myppid
1547912Sbostic 
1647912Sbostic SYSCALL(fork)
1747912Sbostic 	jlbc	r1,1f	# parent, since r1 == 0 in parent, 1 in child
1847912Sbostic 	movl	r0,myppid
1947912Sbostic 	clrl	mypid
2047912Sbostic 	clrl	r0
2147912Sbostic 1:
2247912Sbostic 	ret		# pid = fork()
23