xref: /csrg-svn/lib/libc/sparc/sys/fork.s (revision 61176)
154405Storek/*
2*61176Sbostic * Copyright (c) 1992, 1993
3*61176Sbostic *	The Regents of the University of California.  All rights reserved.
454405Storek *
554405Storek * This software was developed by the Computer Systems Engineering group
654405Storek * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
754405Storek * contributed to Berkeley.
854405Storek *
954405Storek * %sccs.include.redist.c%
1054405Storek *
1154405Storek * from: $Header: fork.s,v 1.1 91/07/06 13:05:58 torek Exp $
1254405Storek */
1354405Storek
1454405Storek#if defined(LIBC_SCCS) && !defined(lint)
15*61176Sbostic	.asciz "@(#)fork.s	8.1 (Berkeley) 06/04/93"
1654405Storek#endif /* LIBC_SCCS and not lint */
1754405Storek
1854405Storek#include "SYS.h"
1954405Storek
2054405StorekSYSCALL(fork)
2154405Storek	dec	%o1		! from 1 to 0 in child, 0 to -1 in parent
2254405Storek	retl
2354405Storek	and	%o0, %o1, %o0	! return 0 in child, pid in parent
24