am c9edc079: am 39e2a408: am 6eb978c9: Merge "Expose wait4 as wait4 rather than __wait4."

* commit 'c9edc0797779187ad1b429e956820928051047ae':
  Expose wait4 as wait4 rather than __wait4.
This commit is contained in:
Elliott Hughes 2013-03-21 23:23:46 +00:00 committed by Android Git Automerger
commit 6d460efed9
9 changed files with 29 additions and 28 deletions

View File

@ -203,7 +203,6 @@ libc_common_src_files := \
bionic/unlockpt.c \
bionic/usleep.c \
bionic/utmp.c \
bionic/wait.c \
bionic/wcscoll.c \
netbsd/gethnamaddr.c \
netbsd/inet/nsap_addr.c \
@ -285,6 +284,7 @@ libc_bionic_src_files := \
bionic/__umask_chk.cpp \
bionic/__vsnprintf_chk.cpp \
bionic/__vsprintf_chk.cpp \
bionic/wait.cpp \
bionic/wchar.cpp \
libc_upstream_freebsd_src_files := \

View File

@ -37,6 +37,7 @@ void _exit_thread:exit (int) 1
pid_t __fork:fork (void) 2
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
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
# to have __NR_clone properly defined.
@ -283,7 +284,6 @@ int ioprio_get(int which, int who) 315,290,315
# other
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
int __reboot:reboot(int, int, int, void *) 88
int __syslog:syslog(int, char *, int) 103

View File

@ -4,6 +4,7 @@ syscall_src += arch-arm/syscalls/_exit.S
syscall_src += arch-arm/syscalls/_exit_thread.S
syscall_src += arch-arm/syscalls/__fork.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/execve.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_get.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/__reboot.S
syscall_src += arch-arm/syscalls/__syslog.S

View File

@ -3,7 +3,7 @@
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(__wait4)
ENTRY(wait4)
mov ip, r7
ldr r7, =__NR_wait4
swi #0
@ -12,4 +12,4 @@ ENTRY(__wait4)
bxls lr
neg r0, r0
b __set_errno
END(__wait4)
END(wait4)

View File

@ -5,6 +5,7 @@ syscall_src += arch-mips/syscalls/_exit_thread.S
syscall_src += arch-mips/syscalls/__fork.S
syscall_src += arch-mips/syscalls/_waitpid.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/execve.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_get.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/__reboot.S
syscall_src += arch-mips/syscalls/__syslog.S

View File

@ -1,11 +1,11 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl __wait4
.globl wait4
.align 4
.ent __wait4
.ent wait4
__wait4:
wait4:
.set noreorder
.cpload $t9
li $v0, __NR_wait4
@ -19,4 +19,4 @@ __wait4:
j $t9
nop
.set reorder
.end __wait4
.end wait4

View File

@ -5,6 +5,7 @@ syscall_src += arch-x86/syscalls/_exit_thread.S
syscall_src += arch-x86/syscalls/__fork.S
syscall_src += arch-x86/syscalls/_waitpid.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/execve.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_get.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/__reboot.S
syscall_src += arch-x86/syscalls/__syslog.S

View File

@ -3,7 +3,7 @@
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(__wait4)
ENTRY(wait4)
pushl %ebx
pushl %ecx
pushl %edx
@ -27,4 +27,4 @@ ENTRY(__wait4)
popl %ecx
popl %ebx
ret
END(__wait4)
END(wait4)

View File

@ -25,29 +25,30 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#include <sys/wait.h>
#include <stddef.h>
extern pid_t __wait4 (pid_t pid, int *status, int options, struct rusage *rusage);
extern int __waitid(idtype_t which, id_t id, siginfo_t *info, int options, struct rusage *ru);
extern "C" int __waitid(idtype_t which, id_t id, siginfo_t* info, int options, struct rusage* ru);
pid_t wait( int* status )
{
return __wait4( (pid_t)-1, status, 0, NULL );
pid_t wait(int* status) {
return wait4(-1, status, 0, NULL);
}
pid_t wait3(int* status, int options, struct rusage* rusage)
{
return __wait4( (pid_t)-1, status, options, rusage );
pid_t wait3(int* status, int options, struct rusage* rusage) {
return wait4(-1, status, options, rusage);
}
pid_t waitpid(pid_t pid, int* status, int options)
{
return __wait4( pid, status, options, NULL );
pid_t waitpid(pid_t pid, int* status, int options) {
return wait4(pid, status, options, NULL);
}
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 */
return __waitid(which, id, info, options, NULL);
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 */
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);
}