summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/wait.c
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2015-01-11 22:16:31 +0000
committerkib <kib@FreeBSD.org>2015-01-11 22:16:31 +0000
commitaa476ee143a448f0d8b021f73e5577528f38a90f (patch)
tree03ec5a1da8c8dc62a7c7675c7ae5b550b9c53375 /lib/libc/gen/wait.c
parentcdb24d0c725ccb4b7282b84521988f70a4d4cc1d (diff)
downloadFreeBSD-src-aa476ee143a448f0d8b021f73e5577528f38a90f.zip
FreeBSD-src-aa476ee143a448f0d8b021f73e5577528f38a90f.tar.gz
Reduce the size of the interposing table and amount of
cancellation-handling code in the libthr. Translate some syscalls into their more generic counterpart, and remove translated syscalls from the table. List of the affected syscalls: creat, open -> openat raise -> thr_kill sleep, usleep -> nanosleep pause -> sigsuspend wait, wait3, waitpid -> wait4 Suggested and reviewed by: jilles (previous version) Sponsored by: The FreeBSD Foundation MFC after: 1 week
Diffstat (limited to 'lib/libc/gen/wait.c')
-rw-r--r--lib/libc/gen/wait.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/lib/libc/gen/wait.c b/lib/libc/gen/wait.c
index dc1351d..46a3fdd 100644
--- a/lib/libc/gen/wait.c
+++ b/lib/libc/gen/wait.c
@@ -42,21 +42,13 @@ __FBSDID("$FreeBSD$");
#include "libc_private.h"
-#pragma weak wait
pid_t
-wait(int *istat)
+__wait(int *istat)
{
- return (((pid_t (*)(int *))
- __libc_interposing[INTERPOS_wait])(istat));
+ return (((pid_t (*)(pid_t, int *, int, struct rusage *))
+ __libc_interposing[INTERPOS_wait4])(WAIT_ANY, istat, 0, NULL));
}
-pid_t
-__libc_wait(int *istat)
-{
-
- return (__sys_wait4(WAIT_ANY, istat, 0, NULL));
-}
-
-__weak_reference(__libc_wait, __wait);
-__weak_reference(__libc_wait, _wait);
+__weak_reference(__wait, wait);
+__weak_reference(__wait, _wait);
OpenPOWER on IntegriCloud