xref: /original-bsd/lib/libc/vax/sys/cache.lib/fork.c (revision e0399a72)
1 /*-
2  * Copyright (c) 1983 The Regents of the University of California.
3  * All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  */
7 
8 #if defined(LIBC_SCCS) && !defined(lint)
9 	.asciz "@(#)fork.c	5.2 (Berkeley) 04/12/91"
10 #endif /* LIBC_SCCS and not lint */
11 
12 #include "SYS.h"
13 
14 	.globl	mypid, myppid
15 
16 SYSCALL(fork)
17 	jlbc	r1,1f	# parent, since r1 == 0 in parent, 1 in child
18 	movl	r0,myppid
19 	clrl	mypid
20 	clrl	r0
21 1:
22 	ret		# pid = fork()
23