@@ -326,12 +326,8 @@ void Sysdeps<Yield>::operator()() { zinnia_syscall(SYSCALL_YIELD); }
326326
327327int
328328Sysdeps<Waitpid>::operator ()(pid_t pid, int *status, int flags, struct rusage *ru, pid_t *ret_pid) {
329- if (ru) {
330- mlibc::infoLogger () << " mlibc: struct rusage in sys_waitpid is unsupported" << frg::endlog;
331- return ENOSYS ;
332- }
333329again:
334- auto r = zinnia_syscall (SYSCALL_WAITPID , pid, (size_t )status, flags);
330+ auto r = zinnia_syscall (SYSCALL_WAITPID , pid, (size_t )status, flags, ( size_t )ru );
335331 if (r.error ) {
336332 if (r.error == EINTR )
337333 goto again;
@@ -740,6 +736,10 @@ int Sysdeps<Madvise>::operator()(void *addr, size_t length, int advice) {
740736 return zinnia_syscall (SYSCALL_MADVISE , (size_t )addr, length, advice).error ;
741737}
742738
739+ int Sysdeps<PosixMadvise>::operator ()(void *addr, size_t length, int advice) {
740+ return zinnia_syscall (SYSCALL_MADVISE , (size_t )addr, length, advice).error ;
741+ }
742+
743743int Sysdeps<GetItimer>::operator ()(int which, struct itimerval *curr_value) {
744744 return zinnia_syscall (SYSCALL_ITIMER_GET , which, (size_t )curr_value).error ;
745745}
@@ -889,4 +889,8 @@ int Sysdeps<Sysconf>::operator()(int num, long *ret) {
889889 return 0 ;
890890}
891891
892+ int Sysdeps<Pause>::operator ()() {
893+ return sysdep<Ppoll>(NULL , 0 , NULL , NULL , NULL );
894+ }
895+
892896} // namespace mlibc
0 commit comments