1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

Consolidate non cancellable pause call

This patch consolidates all the non cancellable pause calls to use
the __pause_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_lock.c (__pthread_mutex_lock_full): Replace
	pause_not_cancel with __pause_nocancel.
	* sysdeps/generic/not-cancel.h (pause_not_cancel): Remove macro.
	(__pause_nocancel): New macro.
	* sysdeps/unix/sysv/linux/not-cancel.h (pause_not_cancel): Remove
	macro.
	(__pause_nocancel): New prototype.
	* sysdeps/unix/sysv/linux/pause.c (__pause_nocancel): New function.
This commit is contained in:
Adhemerval Zanella
2017-08-21 17:23:56 -03:00
parent ee4e992ebe
commit 08d6eb46ca
7 changed files with 27 additions and 28 deletions

View File

@ -77,14 +77,8 @@ __typeof (waitpid) __waitpid_nocancel;
libc_hidden_proto (__waitpid_nocancel)
/* Uncancelable pause. */
#define pause_not_cancel() \
({ sigset_t set; \
int __rc = INLINE_SYSCALL (rt_sigprocmask, 4, SIG_BLOCK, NULL, &set, \
_NSIG / 8); \
if (__rc == 0) \
__rc = INLINE_SYSCALL (rt_sigsuspend, 2, &set, _NSIG / 8); \
__rc; \
})
__typeof (pause) __pause_nocancel;
libc_hidden_proto (__pause_nocancel)
/* Uncancelable nanosleep. */
#define nanosleep_not_cancel(requested_time, remaining) \