sem_timedwait: The semaphore times out when the clock_REALTIME is used.
Szabolcs Nagy
szabolcs.nagy@arm.com
Thu Apr 8 14:10:51 GMT 2021
The 04/06/2021 21:09, y00575850 via Libc-stable wrote:
> Dear Carlos,
> When I use sem_timedwait, a time jump will cause the semaphore to time out.
> While I know that using CLOCK_REALTIME is POSIX-defined behavior, it doesn't
> fit the actual meaning of this function.To solve this problem, modify the
> sem_timedwait process, for example: add a switch control.
> Or add an interface that uses the Clock_MONOTONIC interface.
this is the wrong list.
you don't seem to understand the interface contract of sem_timedwait,
it cannot change the used clock.
glibc has non-standard apis to wait with different clock
https://www.gnu.org/software/libc/manual/html_node/Waiting-with-Explicit-Clocks.html
More information about the Libc-stable
mailing list