--- pth_syscall.c 2002/11/03 16:53:27 1.27
+++ pth_syscall.c 2002/11/08 16:05:55 1.28
@@ -37,6 +37,8 @@
#define fork __pth_sys_fork
#define waitpid __pth_sys_waitpid
#define system __pth_sys_system
+#define nanosleep __pth_sys_nanosleep
+#define usleep __pth_sys_usleep
#define sleep __pth_sys_sleep
#define sigprocmask __pth_sys_sigmask
#define sigwait __pth_sys_sigwait
@@ -86,6 +88,8 @@
#undef fork
#undef waitpid
#undef system
+#undef nanosleep
+#undef usleep
#undef sleep
#undef sigprocmask
#undef sigwait
@@ -134,26 +138,30 @@
#define PTH_SCF_fork 0
#define PTH_SCF_waitpid 1
#define PTH_SCF_system 2
-#define PTH_SCF_sleep 3
-#define PTH_SCF_sigprocmask 4
-#define PTH_SCF_sigwait 5
-#define PTH_SCF_select 6
-#define PTH_SCF_poll 7
-#define PTH_SCF_connect 8
-#define PTH_SCF_accept 9
-#define PTH_SCF_read 10
-#define PTH_SCF_write 11
-#define PTH_SCF_readv 12
-#define PTH_SCF_writev 13
-#define PTH_SCF_recv 14
-#define PTH_SCF_send 15
-#define PTH_SCF_recvfrom 16
-#define PTH_SCF_sendto 17
-#define PTH_SCF_pread 18
-#define PTH_SCF_pwrite 19
+#define PTH_SCF_nanosleep 3
+#define PTH_SCF_usleep 4
+#define PTH_SCF_sleep 5
+#define PTH_SCF_sigprocmask 6
+#define PTH_SCF_sigwait 7
+#define PTH_SCF_select 8
+#define PTH_SCF_poll 9
+#define PTH_SCF_connect 10
+#define PTH_SCF_accept 11
+#define PTH_SCF_read 12
+#define PTH_SCF_write 13
+#define PTH_SCF_readv 14
+#define PTH_SCF_writev 15
+#define PTH_SCF_recv 16
+#define PTH_SCF_send 17
+#define PTH_SCF_recvfrom 18
+#define PTH_SCF_sendto 19
+#define PTH_SCF_pread 20
+#define PTH_SCF_pwrite 21
{ "fork", NULL },
{ "waitpid", NULL },
{ "system", NULL },
+ { "nanosleep", NULL },
+ { "usleep", NULL },
{ "sleep", NULL },
{ "sigprocmask", NULL },
{ "sigwait", NULL },
@@ -301,6 +309,28 @@
#endif
}
+/* ==== Pth hard syscall wrapper for nanosleep(3) ==== */
+int nanosleep(const struct timespec *, struct timespec *);
+int nanosleep(const struct timespec *rqtp, struct timespec *rmtp)
+{
+ /* external entry point for application */
+ pth_implicit_init();
+ return pth_nanosleep(rqtp, rmtp);
+}
+/* NOTICE: internally fully emulated, so still no
+ internal exit point pth_sc_nanosleep necessary! */
+
+/* ==== Pth hard syscall wrapper for usleep(3) ==== */
+int usleep(unsigned int);
+int usleep(unsigned int sec)
+{
+ /* external entry point for application */
+ pth_implicit_init();
+ return pth_usleep(sec);
+}
+/* NOTICE: internally fully emulated, so still no
+ internal exit point pth_sc_usleep necessary! */
+
/* ==== Pth hard syscall wrapper for sleep(3) ==== */
unsigned int sleep(unsigned int);
unsigned int sleep(unsigned int sec)
|