xref: /csrg-svn/lib/libc/sparc/sys/pipe.s (revision 61176)
154406Storek/*
2*61176Sbostic * Copyright (c) 1992, 1993
3*61176Sbostic *	The Regents of the University of California.  All rights reserved.
454406Storek *
554406Storek * This software was developed by the Computer Systems Engineering group
654406Storek * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
754406Storek * contributed to Berkeley.
854406Storek *
954406Storek * %sccs.include.redist.c%
1054406Storek *
1154406Storek * from: $Header: pipe.s,v 1.1 91/07/06 13:05:58 torek Exp $
1254406Storek */
1354406Storek
1454406Storek#if defined(LIBC_SCCS) && !defined(lint)
15*61176Sbostic	.asciz "@(#)pipe.s	8.1 (Berkeley) 06/04/93"
1654406Storek#endif /* LIBC_SCCS and not lint */
1754406Storek
1854406Storek#include "SYS.h"
1954406Storek
2054406StorekENTRY(pipe)
2154406Storek	mov	%o0, %o2	! save pointer
2254406Storek	mov	SYS_pipe, %g1
2354406Storek	t	ST_SYSCALL	! pipe()
2454406Storek	bcc,a	1f
2554406Storek	 st	%o0, [%o2]	! success, store fds
2654406Storek	ERROR()
2754406Storek1:
2854406Storek	st	%o1, [%o2 + 4]
2954406Storek	retl			! and return 0
3054406Storek	 clr	%o0
31