mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-01 10:06:57 +03:00
Consolidate non cancellable waitpid call
This patch consolidates all the non cancellable waitpid calls to use the __waitpid_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. * libio/ioopen.c (_IO_waitpid): Replace waitpid_not_cancel with __waitpid_nocancel. * sysdeps/generic/not-cancel.h (waitpid_not_cancel): Remove macro. (__waitpid_nocancel): New macro. * sysdeps/unix/sysv/linux/not-cancel.h (waitpid_not_cancel): Remove macro. (__waitpid_nocancel): Replace macro with a function. * sysdeps/unix/sysv/linux/waitpid.c (__waitpid_nocancel): New function.
This commit is contained in:
@ -25,6 +25,7 @@
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/syscall.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
/* Non cancellable open syscall. */
|
||||
__typeof (open) __open_nocancel;
|
||||
@ -72,10 +73,8 @@ __writev_nocancel_nostatus (int fd, const struct iovec *iov, int iovcnt)
|
||||
}
|
||||
|
||||
/* Uncancelable waitpid. */
|
||||
#define __waitpid_nocancel(pid, stat_loc, options) \
|
||||
INLINE_SYSCALL (wait4, 4, pid, stat_loc, options, NULL)
|
||||
#define waitpid_not_cancel(pid, stat_loc, options) \
|
||||
__waitpid_nocancel(pid, stat_loc, options)
|
||||
__typeof (waitpid) __waitpid_nocancel;
|
||||
libc_hidden_proto (__waitpid_nocancel)
|
||||
|
||||
/* Uncancelable pause. */
|
||||
#define pause_not_cancel() \
|
||||
|
Reference in New Issue
Block a user