@@ -429,7 +429,7 @@ __pthread_mutex_timedlock (pthread_mutex_t *mutex,
--reltime.tv_sec;
}
if (reltime.tv_sec >= 0)
- while (nanosleep_not_cancel (&reltime, &reltime) != 0)
+ while (__nanosleep_nocancel (&reltime, &reltime) != 0)
continue;
return ETIMEDOUT;
@@ -40,7 +40,7 @@
__waitpid (pid, stat_loc, options)
#define __pause_nocancel() \
__pause ()
-#define nanosleep_not_cancel(requested_time, remaining) \
+#define __nanosleep_nocancel(requested_time, remaining) \
__nanosleep (requested_time, remaining)
#define sigsuspend_not_cancel(set) \
__sigsuspend (set)
@@ -18,6 +18,7 @@
#include <time.h>
#include <sysdep-cancel.h>
+#include <not-cancel.h>
/* Pause execution for a number of nanoseconds. */
int
@@ -28,3 +29,11 @@ __nanosleep (const struct timespec *requested_time,
}
hidden_def (__nanosleep)
weak_alias (__nanosleep, nanosleep)
+
+int
+__nanosleep_nocancel (const struct timespec *requested_time,
+ struct timespec *remaining)
+{
+ return INLINE_SYSCALL_CALL (nanosleep, requested_time, remaining);
+}
+hidden_def (__nanosleep_nocancel)
@@ -26,6 +26,7 @@
#include <unistd.h>
#include <sys/syscall.h>
#include <sys/wait.h>
+#include <time.h>
/* Non cancellable open syscall. */
__typeof (open) __open_nocancel;
@@ -82,8 +83,8 @@ __typeof (pause) __pause_nocancel;
libc_hidden_proto (__pause_nocancel)
/* Uncancelable nanosleep. */
-#define nanosleep_not_cancel(requested_time, remaining) \
- INLINE_SYSCALL (nanosleep, 2, requested_time, remaining)
+__typeof (__nanosleep) __nanosleep_nocancel;
+hidden_proto (__nanosleep_nocancel)
/* Uncancelable sigsuspend. */
#define sigsuspend_not_cancel(set) \