linux: Avoid shifting a negative signed on POSIX timer interface
commit9b5e138f2bbd032da858a4ad5bb51ed99d6f89b6
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 30 Aug 2022 12:08:02 +0000 (30 09:08 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 20 Oct 2022 13:19:08 +0000 (20 10:19 -0300)
treed61137c94c8088bde747b0b6c741c35e0ed22f1a
parent643a2d01399188192e0da234581034f77c892054
linux: Avoid shifting a negative signed on POSIX timer interface

The current macros uses pid as signed value, which triggers a compiler
warning for process and thread timers.  Replace MAKE_PROCESS_CPUCLOCK
with static inline function that expects the pid as unsigned.  These
are similar to what Linux does internally.

Checked on x86_64-linux-gnu.
Reviewed-by: Arjun Shankar <arjun@redhat.com>
nptl/pthread_getcpuclockid.c
sysdeps/unix/sysv/linux/clock_getcpuclockid.c
sysdeps/unix/sysv/linux/clock_nanosleep.c
sysdeps/unix/sysv/linux/kernel-posix-cpu-timers.h
sysdeps/unix/sysv/linux/timer_create.c