Skip to content
Commit 8b0e795a authored by Adhemerval Zanella's avatar Adhemerval Zanella
Browse files

Simplify Linux sig{timed}wait{info} implementations



This patch simplifies sig{timed}wait{info} by:

  - Assuming __NR_rt_sigtimedwait existence on all architectures due minimum
    kernel version requirement (it pre-dates Linux git inclusion for Linux
    2.6.12).

  - Call __sigtimedwait on both sigwait and sigwaitinfo.

  - Now that sigwait is based on an internal sigtimedwait call and it is
    present of both libc.so and libpthread.so we need to add an external
    private definition of __sigtimedwait for libpthread.so call.

Checked on x86_64-linux-gnu.

	* sysdeps/unix/sysv/linux/Versions (libc) [GLIBC_PRIVATE]: Add
	__sigtimedwait.
	* sysdeps/unix/sysv/linux/sigtimedwait.c: Simplify includes and
	assume __NR_rt_sigtimedwait.
	* sysdeps/unix/sysv/linux/sigwait.c (__sigwait): Call __sigtimedwait
	and add LIBC_CANCEL_HANDLED for cancellation marking.
	* sysdeps/unix/sysv/linux/sigwaitinfo.c (__sigwaitinfo): Likewise.

Signed-off-by: default avatarAdhemerval Zanella <adhemerval.zanella@linaro.org>
Reviewed-by: default avatarZack Weinberg <zackw@panix.com>
parent a1a638dd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment