1*54403Storek/* 2*54403Storek * Copyright (c) 1992 The Regents of the University of California. 3*54403Storek * All rights reserved. 4*54403Storek * 5*54403Storek * This software was developed by the Computer Systems Engineering group 6*54403Storek * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and 7*54403Storek * contributed to Berkeley. 8*54403Storek * 9*54403Storek * %sccs.include.redist.c% 10*54403Storek * 11*54403Storek * from: $Header: Ovfork.s,v 1.1 91/07/06 13:05:56 torek Exp $ 12*54403Storek */ 13*54403Storek 14*54403Storek#if defined(LIBC_SCCS) && !defined(lint) 15*54403Storek .asciz "@(#)Ovfork.s 5.1 (Berkeley) 06/25/92" 16*54403Storek#endif /* LIBC_SCCS and not lint */ 17*54403Storek 18*54403Storek/* 19*54403Storek * pid = vfork(); 20*54403Storek * 21*54403Storek * %o1 == 0 in parent process, 1 in child process. 22*54403Storek * %o0 == pid of child in parent, pid of parent in child. 23*54403Storek */ 24*54403Storek 25*54403Storek#include "SYS.h" 26*54403Storek 27*54403StorekSYSCALL(vfork) 28*54403Storek dec %o1 ! from 1 to 0 in child, 0 to -1 in parent 29*54403Storek retl 30*54403Storek and %o0, %o1, %o0 ! return 0 in child, pid in parent 31