Home | History | Annotate | Line # | Download | only in sys
__vfork14.S revision 1.2.12.1
      1  1.2.12.1  nathanw /*	$NetBSD: __vfork14.S,v 1.2.12.1 2002/08/01 03:28:02 nathanw Exp $	*/
      2       1.1  thorpej 
      3       1.1  thorpej /*
      4       1.1  thorpej  * pid = vfork();
      5       1.1  thorpej  *
      6       1.1  thorpej  * r4 == 0 in parent process, 1 in child process.
      7       1.1  thorpej  * r3 == pid of child in parent, pid of parent in child.
      8       1.1  thorpej  */
      9       1.1  thorpej 
     10       1.1  thorpej #include "SYS.h"
     11       1.1  thorpej 
     12       1.1  thorpej SYSCALL(__vfork14)
     13  1.2.12.1  nathanw 	addi	%r4,%r4,-1	# from 1 to 0 in child, 0 to -1 in parent
     14  1.2.12.1  nathanw 	and	%r3,%r3,%r4	# return 0 in child, pid in parent
     15       1.1  thorpej 	blr
     16