12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- #include <signal.h>
- #include <bits/kernel-features.h>
- static __inline__ void restart(pthread_descr th)
- {
-
- #if __ASSUME_REALTIME_SIGNALS
- __pthread_restart_new(th);
- #else
- __pthread_restart(th);
- #endif
- }
- static __inline__ void suspend(pthread_descr self)
- {
-
- #if __ASSUME_REALTIME_SIGNALS
- __pthread_wait_for_restart_signal(self);
- #else
- __pthread_suspend(self);
- #endif
- }
- static __inline__ int timedsuspend(pthread_descr self,
- const struct timespec *abstime)
- {
-
- #if __ASSUME_REALTIME_SIGNALS
- return __pthread_timedsuspend_new(self, abstime);
- #else
- return __pthread_timedsuspend(self, abstime);
- #endif
- }
|