mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
Consolidate non cancellable nanosleep call
This patch consolidates all the non cancellable nanosleep calls to use the __nanosleep_nocancel identifier. For non cancellable targets it will be just a macro to call the default respective symbol while on Linux will be a internal one. Checked on x86_64-linux-gnu, x86_64-linux-gnu-x32, and i686-linux-gnu. * nptl/pthread_mutex_timedlock.c (__pthread_mutex_timedlock): Replace nanosleep_not_cancel with __nanosleep_nocancel. * sysdeps/generic/not-cancel.h (nanosleep_not_cancel): Remove macro. (__nanosleep_nocancel): New macro. * sysdeps/unix/sysv/linux/nanosleep.c (__nanosleep_nocancel): New function. * sysdeps/unix/sysv/linux/not-cancel.h (nanosleep_not_cancel): Remove macro. (__nanosleep_nocancel): New prototype.
This commit is contained in:
@ -432,7 +432,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;
|
||||
|
Reference in New Issue
Block a user