diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2017-07-03 15:54:02 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2017-08-22 14:25:08 -0300 |
commit | 6f33fd046b8e8746e2abc19db2fdfd9c668750e9 (patch) | |
tree | da71fd336762e9c721ab6341dcc5007368f01215 /nptl | |
parent | 08d6eb46caf13f46ce052d2be34522068c5a6d33 (diff) | |
download | glibc-6f33fd046b8e8746e2abc19db2fdfd9c668750e9.tar glibc-6f33fd046b8e8746e2abc19db2fdfd9c668750e9.tar.gz glibc-6f33fd046b8e8746e2abc19db2fdfd9c668750e9.tar.bz2 glibc-6f33fd046b8e8746e2abc19db2fdfd9c668750e9.zip |
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.
Diffstat (limited to 'nptl')
-rw-r--r-- | nptl/pthread_mutex_timedlock.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nptl/pthread_mutex_timedlock.c b/nptl/pthread_mutex_timedlock.c index d5ec3141f3..45f34548a8 100644 --- a/nptl/pthread_mutex_timedlock.c +++ b/nptl/pthread_mutex_timedlock.c @@ -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; |