1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
$NetBSD: patch-ad,v 1.2 2002/10/14 11:49:56 skrll Exp $
--- pth_syscall.c.orig Sun Jan 27 11:03:41 2002
+++ pth_syscall.c
@@ -63,6 +63,24 @@ pid_t fork(void)
}
#endif
+/* Pth hard wrapper for nanosleep(2) [internally fully emulated] */
+#if PTH_SYSCALL_HARD
+int nanosleep(const struct timespec *rqtp, struct timespec *rmtp)
+{
+ pth_implicit_init();
+ return pth_nanosleep(rqtp, rmtp);
+}
+#endif
+
+/* Pth hard wrapper for usleep(3) [internally fully emulated] */
+#if PTH_SYSCALL_HARD
+int usleep(useconds_t usec)
+{
+ pth_implicit_init();
+ return pth_usleep(usec);
+}
+#endif
+
/* Pth hard wrapper for sleep(3) [internally fully emulated] */
#if PTH_SYSCALL_HARD
unsigned int sleep(unsigned int sec)
@@ -85,11 +103,13 @@ int system(const char *cmd)
#if cpp
#if defined(SYS_sigprocmask)
#define PTH_SC_sigprocmask(a1,a2,a3) ((int)syscall(SYS_sigprocmask,(a1),(a2),(a3)))
+#elif defined(SYS___sigprocmask14)
+#define PTH_SC_sigprocmask(a1,a2,a3) ((int)syscall(SYS___sigprocmask14,(a1),(a2),(a3)))
#else
#define PTH_SC_sigprocmask sigprocmask
#endif
#endif /* cpp */
-#if PTH_SYSCALL_HARD && defined(SYS_sigprocmask)
+#if PTH_SYSCALL_HARD && (defined(SYS_sigprocmask) || defined(SYS___sigprocmask14))
int sigprocmask(int how, const sigset_t *set, sigset_t *oset)
{
pth_implicit_init();
@@ -119,6 +139,22 @@ pid_t waitpid(pid_t wpid, int *status, i
{
pth_implicit_init();
return pth_waitpid(wpid, status, options);
+}
+#endif
+
+/* Pth hard wrapper for syscall wait4(2) */
+#if cpp
+#if defined(SYS_wait4)
+#define PTH_SC_wait4(a1,a2,a3,a4) ((int)syscall(SYS_wait4,(a1),(a2),(a3),(a4)))
+#else
+#define PTH_SC_wait4 wait4
+#endif
+#endif /* cpp */
+#if PTH_SYSCALL_HARD && defined(SYS_wait4)
+pid_t wait4(pid_t wpid, int *status, int options, struct rusage *rusage)
+{
+ pth_implicit_init();
+ return pth_wait4(wpid, status, options, rusage);
}
#endif
|