1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- #include <features.h>
- #include <sys/syscall.h>
- #include <asm/errno.h>
- .text
- .global pipe
- .type pipe, @function
- .align 4
- pipe:
- save %sp,-96,%sp
-
- tst %i0
- be .Lerror
- mov %i2,%o0
-
- set __NR_pipe,%g1
- ta 0x10
- bcs .Lerror
- nop
-
- st %o0,[%i0]
- st %o1,[%i0+4]
- ret
- restore %g0,%g0,%o0
- .Lerror:
- call __errno_location
- or %g0,EINVAL,%i0
- st %i0,[%o0]
- ret
- restore %g0,-1,%o0
- .size pipe,.-pipe
- libc_hidden_def(pipe)
|