* commit 'c9edc0797779187ad1b429e956820928051047ae': Expose wait4 as wait4 rather than __wait4.
This commit is contained in:
commit
6d460efed9
@ -203,7 +203,6 @@ libc_common_src_files := \
|
|||||||
bionic/unlockpt.c \
|
bionic/unlockpt.c \
|
||||||
bionic/usleep.c \
|
bionic/usleep.c \
|
||||||
bionic/utmp.c \
|
bionic/utmp.c \
|
||||||
bionic/wait.c \
|
|
||||||
bionic/wcscoll.c \
|
bionic/wcscoll.c \
|
||||||
netbsd/gethnamaddr.c \
|
netbsd/gethnamaddr.c \
|
||||||
netbsd/inet/nsap_addr.c \
|
netbsd/inet/nsap_addr.c \
|
||||||
@ -285,6 +284,7 @@ libc_bionic_src_files := \
|
|||||||
bionic/__umask_chk.cpp \
|
bionic/__umask_chk.cpp \
|
||||||
bionic/__vsnprintf_chk.cpp \
|
bionic/__vsnprintf_chk.cpp \
|
||||||
bionic/__vsprintf_chk.cpp \
|
bionic/__vsprintf_chk.cpp \
|
||||||
|
bionic/wait.cpp \
|
||||||
bionic/wchar.cpp \
|
bionic/wchar.cpp \
|
||||||
|
|
||||||
libc_upstream_freebsd_src_files := \
|
libc_upstream_freebsd_src_files := \
|
||||||
|
@ -37,6 +37,7 @@ void _exit_thread:exit (int) 1
|
|||||||
pid_t __fork:fork (void) 2
|
pid_t __fork:fork (void) 2
|
||||||
pid_t _waitpid:waitpid (pid_t, int*, int, struct rusage*) -1,7,7
|
pid_t _waitpid:waitpid (pid_t, int*, int, struct rusage*) -1,7,7
|
||||||
int __waitid:waitid(int, pid_t, struct siginfo_t*, int,void*) 280,284,278
|
int __waitid:waitid(int, pid_t, struct siginfo_t*, int,void*) 280,284,278
|
||||||
|
pid_t wait4(pid_t pid, int *status, int options, struct rusage *rusage) 114
|
||||||
|
|
||||||
# NOTE: this system call is never called directly, but we list it there
|
# NOTE: this system call is never called directly, but we list it there
|
||||||
# to have __NR_clone properly defined.
|
# to have __NR_clone properly defined.
|
||||||
@ -283,7 +284,6 @@ int ioprio_get(int which, int who) 315,290,315
|
|||||||
|
|
||||||
# other
|
# other
|
||||||
int uname(struct utsname *) 122
|
int uname(struct utsname *) 122
|
||||||
pid_t __wait4:wait4(pid_t pid, int *status, int options, struct rusage *rusage) 114
|
|
||||||
mode_t umask(mode_t) 60
|
mode_t umask(mode_t) 60
|
||||||
int __reboot:reboot(int, int, int, void *) 88
|
int __reboot:reboot(int, int, int, void *) 88
|
||||||
int __syslog:syslog(int, char *, int) 103
|
int __syslog:syslog(int, char *, int) 103
|
||||||
|
@ -4,6 +4,7 @@ syscall_src += arch-arm/syscalls/_exit.S
|
|||||||
syscall_src += arch-arm/syscalls/_exit_thread.S
|
syscall_src += arch-arm/syscalls/_exit_thread.S
|
||||||
syscall_src += arch-arm/syscalls/__fork.S
|
syscall_src += arch-arm/syscalls/__fork.S
|
||||||
syscall_src += arch-arm/syscalls/__waitid.S
|
syscall_src += arch-arm/syscalls/__waitid.S
|
||||||
|
syscall_src += arch-arm/syscalls/wait4.S
|
||||||
syscall_src += arch-arm/syscalls/__sys_clone.S
|
syscall_src += arch-arm/syscalls/__sys_clone.S
|
||||||
syscall_src += arch-arm/syscalls/execve.S
|
syscall_src += arch-arm/syscalls/execve.S
|
||||||
syscall_src += arch-arm/syscalls/__setuid.S
|
syscall_src += arch-arm/syscalls/__setuid.S
|
||||||
@ -180,7 +181,6 @@ syscall_src += arch-arm/syscalls/__getcpu.S
|
|||||||
syscall_src += arch-arm/syscalls/ioprio_set.S
|
syscall_src += arch-arm/syscalls/ioprio_set.S
|
||||||
syscall_src += arch-arm/syscalls/ioprio_get.S
|
syscall_src += arch-arm/syscalls/ioprio_get.S
|
||||||
syscall_src += arch-arm/syscalls/uname.S
|
syscall_src += arch-arm/syscalls/uname.S
|
||||||
syscall_src += arch-arm/syscalls/__wait4.S
|
|
||||||
syscall_src += arch-arm/syscalls/umask.S
|
syscall_src += arch-arm/syscalls/umask.S
|
||||||
syscall_src += arch-arm/syscalls/__reboot.S
|
syscall_src += arch-arm/syscalls/__reboot.S
|
||||||
syscall_src += arch-arm/syscalls/__syslog.S
|
syscall_src += arch-arm/syscalls/__syslog.S
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#include <machine/asm.h>
|
#include <machine/asm.h>
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(__wait4)
|
ENTRY(wait4)
|
||||||
mov ip, r7
|
mov ip, r7
|
||||||
ldr r7, =__NR_wait4
|
ldr r7, =__NR_wait4
|
||||||
swi #0
|
swi #0
|
||||||
@ -12,4 +12,4 @@ ENTRY(__wait4)
|
|||||||
bxls lr
|
bxls lr
|
||||||
neg r0, r0
|
neg r0, r0
|
||||||
b __set_errno
|
b __set_errno
|
||||||
END(__wait4)
|
END(wait4)
|
@ -5,6 +5,7 @@ syscall_src += arch-mips/syscalls/_exit_thread.S
|
|||||||
syscall_src += arch-mips/syscalls/__fork.S
|
syscall_src += arch-mips/syscalls/__fork.S
|
||||||
syscall_src += arch-mips/syscalls/_waitpid.S
|
syscall_src += arch-mips/syscalls/_waitpid.S
|
||||||
syscall_src += arch-mips/syscalls/__waitid.S
|
syscall_src += arch-mips/syscalls/__waitid.S
|
||||||
|
syscall_src += arch-mips/syscalls/wait4.S
|
||||||
syscall_src += arch-mips/syscalls/__sys_clone.S
|
syscall_src += arch-mips/syscalls/__sys_clone.S
|
||||||
syscall_src += arch-mips/syscalls/execve.S
|
syscall_src += arch-mips/syscalls/execve.S
|
||||||
syscall_src += arch-mips/syscalls/__setuid.S
|
syscall_src += arch-mips/syscalls/__setuid.S
|
||||||
@ -183,7 +184,6 @@ syscall_src += arch-mips/syscalls/__getcpu.S
|
|||||||
syscall_src += arch-mips/syscalls/ioprio_set.S
|
syscall_src += arch-mips/syscalls/ioprio_set.S
|
||||||
syscall_src += arch-mips/syscalls/ioprio_get.S
|
syscall_src += arch-mips/syscalls/ioprio_get.S
|
||||||
syscall_src += arch-mips/syscalls/uname.S
|
syscall_src += arch-mips/syscalls/uname.S
|
||||||
syscall_src += arch-mips/syscalls/__wait4.S
|
|
||||||
syscall_src += arch-mips/syscalls/umask.S
|
syscall_src += arch-mips/syscalls/umask.S
|
||||||
syscall_src += arch-mips/syscalls/__reboot.S
|
syscall_src += arch-mips/syscalls/__reboot.S
|
||||||
syscall_src += arch-mips/syscalls/__syslog.S
|
syscall_src += arch-mips/syscalls/__syslog.S
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
.text
|
.text
|
||||||
.globl __wait4
|
.globl wait4
|
||||||
.align 4
|
.align 4
|
||||||
.ent __wait4
|
.ent wait4
|
||||||
|
|
||||||
__wait4:
|
wait4:
|
||||||
.set noreorder
|
.set noreorder
|
||||||
.cpload $t9
|
.cpload $t9
|
||||||
li $v0, __NR_wait4
|
li $v0, __NR_wait4
|
||||||
@ -19,4 +19,4 @@ __wait4:
|
|||||||
j $t9
|
j $t9
|
||||||
nop
|
nop
|
||||||
.set reorder
|
.set reorder
|
||||||
.end __wait4
|
.end wait4
|
@ -5,6 +5,7 @@ syscall_src += arch-x86/syscalls/_exit_thread.S
|
|||||||
syscall_src += arch-x86/syscalls/__fork.S
|
syscall_src += arch-x86/syscalls/__fork.S
|
||||||
syscall_src += arch-x86/syscalls/_waitpid.S
|
syscall_src += arch-x86/syscalls/_waitpid.S
|
||||||
syscall_src += arch-x86/syscalls/__waitid.S
|
syscall_src += arch-x86/syscalls/__waitid.S
|
||||||
|
syscall_src += arch-x86/syscalls/wait4.S
|
||||||
syscall_src += arch-x86/syscalls/__sys_clone.S
|
syscall_src += arch-x86/syscalls/__sys_clone.S
|
||||||
syscall_src += arch-x86/syscalls/execve.S
|
syscall_src += arch-x86/syscalls/execve.S
|
||||||
syscall_src += arch-x86/syscalls/__setuid.S
|
syscall_src += arch-x86/syscalls/__setuid.S
|
||||||
@ -184,7 +185,6 @@ syscall_src += arch-x86/syscalls/__getcpu.S
|
|||||||
syscall_src += arch-x86/syscalls/ioprio_set.S
|
syscall_src += arch-x86/syscalls/ioprio_set.S
|
||||||
syscall_src += arch-x86/syscalls/ioprio_get.S
|
syscall_src += arch-x86/syscalls/ioprio_get.S
|
||||||
syscall_src += arch-x86/syscalls/uname.S
|
syscall_src += arch-x86/syscalls/uname.S
|
||||||
syscall_src += arch-x86/syscalls/__wait4.S
|
|
||||||
syscall_src += arch-x86/syscalls/umask.S
|
syscall_src += arch-x86/syscalls/umask.S
|
||||||
syscall_src += arch-x86/syscalls/__reboot.S
|
syscall_src += arch-x86/syscalls/__reboot.S
|
||||||
syscall_src += arch-x86/syscalls/__syslog.S
|
syscall_src += arch-x86/syscalls/__syslog.S
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#include <machine/asm.h>
|
#include <machine/asm.h>
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(__wait4)
|
ENTRY(wait4)
|
||||||
pushl %ebx
|
pushl %ebx
|
||||||
pushl %ecx
|
pushl %ecx
|
||||||
pushl %edx
|
pushl %edx
|
||||||
@ -27,4 +27,4 @@ ENTRY(__wait4)
|
|||||||
popl %ecx
|
popl %ecx
|
||||||
popl %ebx
|
popl %ebx
|
||||||
ret
|
ret
|
||||||
END(__wait4)
|
END(wait4)
|
@ -25,29 +25,30 @@
|
|||||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
extern pid_t __wait4 (pid_t pid, int *status, int options, struct rusage *rusage);
|
extern "C" int __waitid(idtype_t which, id_t id, siginfo_t* info, int options, struct rusage* ru);
|
||||||
extern int __waitid(idtype_t which, id_t id, siginfo_t *info, int options, struct rusage *ru);
|
|
||||||
|
|
||||||
pid_t wait( int* status )
|
pid_t wait(int* status) {
|
||||||
{
|
return wait4(-1, status, 0, NULL);
|
||||||
return __wait4( (pid_t)-1, status, 0, NULL );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pid_t wait3(int* status, int options, struct rusage* rusage)
|
pid_t wait3(int* status, int options, struct rusage* rusage) {
|
||||||
{
|
return wait4(-1, status, options, rusage);
|
||||||
return __wait4( (pid_t)-1, status, options, rusage );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pid_t waitpid(pid_t pid, int* status, int options)
|
pid_t waitpid(pid_t pid, int* status, int options) {
|
||||||
{
|
return wait4(pid, status, options, NULL);
|
||||||
return __wait4( pid, status, options, NULL );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int waitid(idtype_t which, id_t id, siginfo_t *info, int options)
|
int waitid(idtype_t which, id_t id, siginfo_t* info, int options) {
|
||||||
{
|
|
||||||
/* the system call takes an option struct rusage that we don't need */
|
/* the system call takes an option struct rusage that we don't need */
|
||||||
return __waitid(which, id, info, options, NULL);
|
return __waitid(which, id, info, options, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: remove this backward compatibility hack (for jb-mr1 strace binaries).
|
||||||
|
extern "C" pid_t __wait4(pid_t pid, int* status, int options, struct rusage* rusage) {
|
||||||
|
return wait4(pid, status, options, rusage);
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user