am 9973a564
: libc: Add missing waitid() implementation.
Merge commit '9973a564222b842eb7497fd6e659fe8c8c49e2b3' into gingerbread-plus-aosp * commit '9973a564222b842eb7497fd6e659fe8c8c49e2b3': libc: Add missing waitid() implementation.
This commit is contained in:
commit
a511f24561
@ -33,7 +33,7 @@ void _exit:exit_group (int) 248,252
|
||||
void _exit_thread:exit (int) 1
|
||||
pid_t __fork:fork (void) 2
|
||||
pid_t _waitpid:waitpid (pid_t, int*, int, struct rusage*) -1,7
|
||||
int waitid(int, pid_t, struct siginfo_t*, int,void*) 280,284
|
||||
int __waitid:waitid(int, pid_t, struct siginfo_t*, int,void*) 280,284
|
||||
|
||||
# NOTE: this system call is never called directly, but we list it there
|
||||
# to have __NR_clone properly defined.
|
||||
|
@ -3,7 +3,7 @@ syscall_src :=
|
||||
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/__waitid.S
|
||||
syscall_src += arch-arm/syscalls/__sys_clone.S
|
||||
syscall_src += arch-arm/syscalls/execve.S
|
||||
syscall_src += arch-arm/syscalls/__setuid.S
|
||||
|
@ -2,12 +2,12 @@
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type waitid, #function
|
||||
.globl waitid
|
||||
.type __waitid, #function
|
||||
.globl __waitid
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
waitid:
|
||||
__waitid:
|
||||
mov ip, sp
|
||||
.save {r4, r5, r6, r7}
|
||||
stmfd sp!, {r4, r5, r6, r7}
|
@ -4,7 +4,7 @@ syscall_src += arch-sh/syscalls/_exit.S
|
||||
syscall_src += arch-sh/syscalls/_exit_thread.S
|
||||
syscall_src += arch-sh/syscalls/__fork.S
|
||||
syscall_src += arch-sh/syscalls/_waitpid.S
|
||||
syscall_src += arch-sh/syscalls/waitid.S
|
||||
syscall_src += arch-sh/syscalls/__waitid.S
|
||||
syscall_src += arch-sh/syscalls/__sys_clone.S
|
||||
syscall_src += arch-sh/syscalls/execve.S
|
||||
syscall_src += arch-sh/syscalls/__setuid.S
|
||||
|
@ -2,11 +2,11 @@
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type waitid, @function
|
||||
.globl waitid
|
||||
.type __waitid, @function
|
||||
.globl __waitid
|
||||
.align 4
|
||||
|
||||
waitid:
|
||||
__waitid:
|
||||
|
||||
/* get ready for additonal arg */
|
||||
mov.l @r15, r0
|
@ -4,7 +4,7 @@ syscall_src += arch-x86/syscalls/_exit.S
|
||||
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/__waitid.S
|
||||
syscall_src += arch-x86/syscalls/__sys_clone.S
|
||||
syscall_src += arch-x86/syscalls/execve.S
|
||||
syscall_src += arch-x86/syscalls/__setuid.S
|
||||
|
@ -2,11 +2,11 @@
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type waitid, @function
|
||||
.globl waitid
|
||||
.type __waitid, @function
|
||||
.globl __waitid
|
||||
.align 4
|
||||
|
||||
waitid:
|
||||
__waitid:
|
||||
pushl %ebx
|
||||
pushl %ecx
|
||||
pushl %edx
|
@ -9,7 +9,7 @@ void _exit (int);
|
||||
void _exit_thread (int);
|
||||
pid_t __fork (void);
|
||||
pid_t _waitpid (pid_t, int*, int, struct rusage*);
|
||||
int waitid (int, pid_t, struct siginfo_t*, int,void*);
|
||||
int __waitid (int, pid_t, struct siginfo_t*, int,void*);
|
||||
pid_t __sys_clone (int, void*, int*, void*, int*);
|
||||
int execve (const char*, char* const*, char* const*);
|
||||
int __setuid (uid_t);
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/resource.h>
|
||||
#include <linux/wait.h>
|
||||
#include <signal.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
@ -49,6 +50,14 @@ extern pid_t waitpid(pid_t, int *, int);
|
||||
extern pid_t wait3(int *, int, struct rusage *);
|
||||
extern pid_t wait4(pid_t, int *, int, struct rusage *);
|
||||
|
||||
/* Posix states that idtype_t should be an enumeration type, but
|
||||
* the kernel headers define P_ALL, P_PID and P_PGID as constant macros
|
||||
* instead.
|
||||
*/
|
||||
typedef int idtype_t;
|
||||
|
||||
extern int waidit(idtype_t which, id_t id, siginfo_t *info, int options);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* _SYS_WAIT_H_ */
|
||||
|
@ -29,6 +29,7 @@
|
||||
#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);
|
||||
|
||||
pid_t wait( int* status )
|
||||
{
|
||||
@ -44,3 +45,9 @@ 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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user