am 914528cd: am 223ddfcf: Merge "libc: Add missing pipe2() declaration and implementation." into gingerbread
Merge commit '914528cdc90dced0c07055d4d986e68adc8da60c' * commit '914528cdc90dced0c07055d4d986e68adc8da60c': libc: Add missing pipe2() declaration and implementation.
This commit is contained in:
commit
6f39e611f3
@ -112,6 +112,7 @@ int flock(int, int) 143
|
|||||||
int fchmod(int, mode_t) 94
|
int fchmod(int, mode_t) 94
|
||||||
int dup(int) 41
|
int dup(int) 41
|
||||||
int pipe(int *) 42,42,-1
|
int pipe(int *) 42,42,-1
|
||||||
|
int pipe2(int *, int) 359,331
|
||||||
int dup2(int, int) 63
|
int dup2(int, int) 63
|
||||||
int select:_newselect(int, struct fd_set *, struct fd_set *, struct fd_set *, struct timeval *) 142
|
int select:_newselect(int, struct fd_set *, struct fd_set *, struct fd_set *, struct timeval *) 142
|
||||||
int ftruncate(int, off_t) 93
|
int ftruncate(int, off_t) 93
|
||||||
@ -229,8 +230,8 @@ int sched_get_priority_min(int policy) 160
|
|||||||
int sched_rr_get_interval(pid_t pid, struct timespec *interval) 161
|
int sched_rr_get_interval(pid_t pid, struct timespec *interval) 161
|
||||||
|
|
||||||
# io priorities
|
# io priorities
|
||||||
int ioprio_set(int which, int who, int ioprio) 314,289
|
int ioprio_set(int which, int who, int ioprio) 314,289,288
|
||||||
int ioprio_get(int which, int who) 315,290
|
int ioprio_get(int which, int who) 315,290,289
|
||||||
|
|
||||||
# other
|
# other
|
||||||
int uname(struct utsname *) 122
|
int uname(struct utsname *) 122
|
||||||
|
@ -66,6 +66,7 @@ syscall_src += arch-arm/syscalls/flock.S
|
|||||||
syscall_src += arch-arm/syscalls/fchmod.S
|
syscall_src += arch-arm/syscalls/fchmod.S
|
||||||
syscall_src += arch-arm/syscalls/dup.S
|
syscall_src += arch-arm/syscalls/dup.S
|
||||||
syscall_src += arch-arm/syscalls/pipe.S
|
syscall_src += arch-arm/syscalls/pipe.S
|
||||||
|
syscall_src += arch-arm/syscalls/pipe2.S
|
||||||
syscall_src += arch-arm/syscalls/dup2.S
|
syscall_src += arch-arm/syscalls/dup2.S
|
||||||
syscall_src += arch-arm/syscalls/select.S
|
syscall_src += arch-arm/syscalls/select.S
|
||||||
syscall_src += arch-arm/syscalls/ftruncate.S
|
syscall_src += arch-arm/syscalls/ftruncate.S
|
||||||
|
19
libc/arch-arm/syscalls/pipe2.S
Normal file
19
libc/arch-arm/syscalls/pipe2.S
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
/* autogenerated by gensyscalls.py */
|
||||||
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
|
.text
|
||||||
|
.type pipe2, #function
|
||||||
|
.globl pipe2
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
pipe2:
|
||||||
|
.save {r4, r7}
|
||||||
|
stmfd sp!, {r4, r7}
|
||||||
|
ldr r7, =__NR_pipe2
|
||||||
|
swi #0
|
||||||
|
ldmfd sp!, {r4, r7}
|
||||||
|
movs r0, r0
|
||||||
|
bxpl lr
|
||||||
|
b __set_syscall_errno
|
||||||
|
.fnend
|
@ -69,6 +69,7 @@ syscall_src += arch-sh/syscalls/__fcntl.S
|
|||||||
syscall_src += arch-sh/syscalls/flock.S
|
syscall_src += arch-sh/syscalls/flock.S
|
||||||
syscall_src += arch-sh/syscalls/fchmod.S
|
syscall_src += arch-sh/syscalls/fchmod.S
|
||||||
syscall_src += arch-sh/syscalls/dup.S
|
syscall_src += arch-sh/syscalls/dup.S
|
||||||
|
syscall_src += arch-sh/syscalls/pipe2.S
|
||||||
syscall_src += arch-sh/syscalls/dup2.S
|
syscall_src += arch-sh/syscalls/dup2.S
|
||||||
syscall_src += arch-sh/syscalls/select.S
|
syscall_src += arch-sh/syscalls/select.S
|
||||||
syscall_src += arch-sh/syscalls/ftruncate.S
|
syscall_src += arch-sh/syscalls/ftruncate.S
|
||||||
|
32
libc/arch-sh/syscalls/pipe2.S
Normal file
32
libc/arch-sh/syscalls/pipe2.S
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
/* autogenerated by gensyscalls.py */
|
||||||
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
|
.text
|
||||||
|
.type pipe2, @function
|
||||||
|
.globl pipe2
|
||||||
|
.align 4
|
||||||
|
|
||||||
|
pipe2:
|
||||||
|
|
||||||
|
/* invoke trap */
|
||||||
|
mov.l 0f, r3 /* trap num */
|
||||||
|
trapa #(2 + 0x10)
|
||||||
|
|
||||||
|
/* check return value */
|
||||||
|
cmp/pz r0
|
||||||
|
bt __NR_pipe2_end
|
||||||
|
|
||||||
|
/* keep error number */
|
||||||
|
sts.l pr, @-r15
|
||||||
|
mov.l 1f, r1
|
||||||
|
jsr @r1
|
||||||
|
mov r0, r4
|
||||||
|
lds.l @r15+, pr
|
||||||
|
|
||||||
|
__NR_pipe2_end:
|
||||||
|
rts
|
||||||
|
nop
|
||||||
|
|
||||||
|
.align 2
|
||||||
|
0: .long __NR_pipe2
|
||||||
|
1: .long __set_syscall_errno
|
@ -69,6 +69,7 @@ syscall_src += arch-x86/syscalls/flock.S
|
|||||||
syscall_src += arch-x86/syscalls/fchmod.S
|
syscall_src += arch-x86/syscalls/fchmod.S
|
||||||
syscall_src += arch-x86/syscalls/dup.S
|
syscall_src += arch-x86/syscalls/dup.S
|
||||||
syscall_src += arch-x86/syscalls/pipe.S
|
syscall_src += arch-x86/syscalls/pipe.S
|
||||||
|
syscall_src += arch-x86/syscalls/pipe2.S
|
||||||
syscall_src += arch-x86/syscalls/dup2.S
|
syscall_src += arch-x86/syscalls/dup2.S
|
||||||
syscall_src += arch-x86/syscalls/select.S
|
syscall_src += arch-x86/syscalls/select.S
|
||||||
syscall_src += arch-x86/syscalls/ftruncate.S
|
syscall_src += arch-x86/syscalls/ftruncate.S
|
||||||
|
26
libc/arch-x86/syscalls/pipe2.S
Normal file
26
libc/arch-x86/syscalls/pipe2.S
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
/* autogenerated by gensyscalls.py */
|
||||||
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
|
.text
|
||||||
|
.type pipe2, @function
|
||||||
|
.globl pipe2
|
||||||
|
.align 4
|
||||||
|
|
||||||
|
pipe2:
|
||||||
|
pushl %ebx
|
||||||
|
pushl %ecx
|
||||||
|
mov 12(%esp), %ebx
|
||||||
|
mov 16(%esp), %ecx
|
||||||
|
movl $__NR_pipe2, %eax
|
||||||
|
int $0x80
|
||||||
|
cmpl $-129, %eax
|
||||||
|
jb 1f
|
||||||
|
negl %eax
|
||||||
|
pushl %eax
|
||||||
|
call __set_errno
|
||||||
|
addl $4, %esp
|
||||||
|
orl $-1, %eax
|
||||||
|
1:
|
||||||
|
popl %ecx
|
||||||
|
popl %ebx
|
||||||
|
ret
|
@ -138,6 +138,7 @@
|
|||||||
#define __NR_openat (__NR_SYSCALL_BASE + 322)
|
#define __NR_openat (__NR_SYSCALL_BASE + 322)
|
||||||
#define __NR_madvise (__NR_SYSCALL_BASE + 220)
|
#define __NR_madvise (__NR_SYSCALL_BASE + 220)
|
||||||
#define __NR_mincore (__NR_SYSCALL_BASE + 219)
|
#define __NR_mincore (__NR_SYSCALL_BASE + 219)
|
||||||
|
#define __NR_pipe2 (__NR_SYSCALL_BASE + 359)
|
||||||
#define __NR_getdents64 (__NR_SYSCALL_BASE + 217)
|
#define __NR_getdents64 (__NR_SYSCALL_BASE + 217)
|
||||||
#define __NR_fstatfs64 (__NR_SYSCALL_BASE + 267)
|
#define __NR_fstatfs64 (__NR_SYSCALL_BASE + 267)
|
||||||
#define __NR_fstatat64 (__NR_SYSCALL_BASE + 327)
|
#define __NR_fstatat64 (__NR_SYSCALL_BASE + 327)
|
||||||
@ -195,6 +196,7 @@
|
|||||||
#define __NR_openat (__NR_SYSCALL_BASE + 295)
|
#define __NR_openat (__NR_SYSCALL_BASE + 295)
|
||||||
#define __NR_madvise (__NR_SYSCALL_BASE + 219)
|
#define __NR_madvise (__NR_SYSCALL_BASE + 219)
|
||||||
#define __NR_mincore (__NR_SYSCALL_BASE + 218)
|
#define __NR_mincore (__NR_SYSCALL_BASE + 218)
|
||||||
|
#define __NR_pipe2 (__NR_SYSCALL_BASE + 331)
|
||||||
#define __NR_getdents64 (__NR_SYSCALL_BASE + 220)
|
#define __NR_getdents64 (__NR_SYSCALL_BASE + 220)
|
||||||
#define __NR_fstatfs64 (__NR_SYSCALL_BASE + 269)
|
#define __NR_fstatfs64 (__NR_SYSCALL_BASE + 269)
|
||||||
#define __NR_fstatat64 (__NR_SYSCALL_BASE + 300)
|
#define __NR_fstatat64 (__NR_SYSCALL_BASE + 300)
|
||||||
@ -237,6 +239,7 @@
|
|||||||
#define __NR_openat (__NR_SYSCALL_BASE + 295)
|
#define __NR_openat (__NR_SYSCALL_BASE + 295)
|
||||||
#define __NR_madvise (__NR_SYSCALL_BASE + 219)
|
#define __NR_madvise (__NR_SYSCALL_BASE + 219)
|
||||||
#define __NR_mincore (__NR_SYSCALL_BASE + 218)
|
#define __NR_mincore (__NR_SYSCALL_BASE + 218)
|
||||||
|
#define __NR_pipe2 (__NR_SYSCALL_BASE + 331)
|
||||||
#define __NR_getdents64 (__NR_SYSCALL_BASE + 220)
|
#define __NR_getdents64 (__NR_SYSCALL_BASE + 220)
|
||||||
#define __NR_fstatfs64 (__NR_SYSCALL_BASE + 269)
|
#define __NR_fstatfs64 (__NR_SYSCALL_BASE + 269)
|
||||||
#define __NR_fstatat64 (__NR_SYSCALL_BASE + 300)
|
#define __NR_fstatat64 (__NR_SYSCALL_BASE + 300)
|
||||||
@ -272,8 +275,8 @@
|
|||||||
#define __NR_socketcall (__NR_SYSCALL_BASE + 102)
|
#define __NR_socketcall (__NR_SYSCALL_BASE + 102)
|
||||||
#define __NR_socketcall (__NR_SYSCALL_BASE + 102)
|
#define __NR_socketcall (__NR_SYSCALL_BASE + 102)
|
||||||
#define __NR___socketcall (__NR_SYSCALL_BASE + 102)
|
#define __NR___socketcall (__NR_SYSCALL_BASE + 102)
|
||||||
#define __NR_ioprio_set (__NR_SYSCALL_BASE + 289)
|
#define __NR_ioprio_set (__NR_SYSCALL_BASE + 288)
|
||||||
#define __NR_ioprio_get (__NR_SYSCALL_BASE + 290)
|
#define __NR_ioprio_get (__NR_SYSCALL_BASE + 289)
|
||||||
#define __NR_epoll_create (__NR_SYSCALL_BASE + 254)
|
#define __NR_epoll_create (__NR_SYSCALL_BASE + 254)
|
||||||
#define __NR_epoll_ctl (__NR_SYSCALL_BASE + 255)
|
#define __NR_epoll_ctl (__NR_SYSCALL_BASE + 255)
|
||||||
#define __NR_epoll_wait (__NR_SYSCALL_BASE + 256)
|
#define __NR_epoll_wait (__NR_SYSCALL_BASE + 256)
|
||||||
|
@ -79,6 +79,7 @@ int flock (int, int);
|
|||||||
int fchmod (int, mode_t);
|
int fchmod (int, mode_t);
|
||||||
int dup (int);
|
int dup (int);
|
||||||
int pipe (int *);
|
int pipe (int *);
|
||||||
|
int pipe2 (int *, int);
|
||||||
int dup2 (int, int);
|
int dup2 (int, int);
|
||||||
int select (int, struct fd_set *, struct fd_set *, struct fd_set *, struct timeval *);
|
int select (int, struct fd_set *, struct fd_set *, struct fd_set *, struct timeval *);
|
||||||
int ftruncate (int, off_t);
|
int ftruncate (int, off_t);
|
||||||
|
@ -118,6 +118,9 @@ extern int chdir(const char *);
|
|||||||
extern int fchdir(int);
|
extern int fchdir(int);
|
||||||
extern int rmdir(const char *);
|
extern int rmdir(const char *);
|
||||||
extern int pipe(int *);
|
extern int pipe(int *);
|
||||||
|
#ifdef _GNU_SOURCE /* GLibc compatibility */
|
||||||
|
extern int pipe2(int *, int);
|
||||||
|
#endif
|
||||||
extern int chroot(const char *);
|
extern int chroot(const char *);
|
||||||
extern int symlink(const char *, const char *);
|
extern int symlink(const char *, const char *);
|
||||||
extern int readlink(const char *, char *, size_t);
|
extern int readlink(const char *, char *, size_t);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user