154403Storek/* 2*61176Sbostic * Copyright (c) 1992, 1993 3*61176Sbostic * The Regents of the University of California. All rights reserved. 454403Storek * 554403Storek * This software was developed by the Computer Systems Engineering group 654403Storek * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and 754403Storek * contributed to Berkeley. 854403Storek * 954403Storek * %sccs.include.redist.c% 1054403Storek * 1154403Storek * from: $Header: Ovfork.s,v 1.1 91/07/06 13:05:56 torek Exp $ 1254403Storek */ 1354403Storek 1454403Storek#if defined(LIBC_SCCS) && !defined(lint) 15*61176Sbostic .asciz "@(#)Ovfork.s 8.1 (Berkeley) 06/04/93" 1654403Storek#endif /* LIBC_SCCS and not lint */ 1754403Storek 1854403Storek/* 1954403Storek * pid = vfork(); 2054403Storek * 2154403Storek * %o1 == 0 in parent process, 1 in child process. 2254403Storek * %o0 == pid of child in parent, pid of parent in child. 2354403Storek */ 2454403Storek 2554403Storek#include "SYS.h" 2654403Storek 2754403StorekSYSCALL(vfork) 2854403Storek dec %o1 ! from 1 to 0 in child, 0 to -1 in parent 2954403Storek retl 3054403Storek and %o0, %o1, %o0 ! return 0 in child, pid in parent 31