This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug nptl/14717] Allow choice of clock source for calls to sem_timedwait() and pthread_mutex_timedwait().


https://sourceware.org/bugzilla/show_bug.cgi?id=14717

Dean Jenkins <Dean_Jenkins at mentor dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Dean_Jenkins at mentor dot com

--- Comment #4 from Dean Jenkins <Dean_Jenkins at mentor dot com> ---
Is there any news on allowing CLOCK_MONOTONIC to be used with sem_timedwait() ?

The issue we are facing on an embedded ARM project is that sem_timedwait() can
misbehave when the system clock aka CLOCK_REALTIME is modified such as by a GPS
timebase. Typically the system does not have a real RTC and starts at the EPOCH
of 1970 and then sometime after boot the system clock gets adjusted to the
present day time. This causes a misbehaviour of sem_timedwait() because an
absolute timespec is used such as a time in 1970.

I think a lack of a monotonic clock for functions such as sem_timedwait() is a
serious limitation in embedded systems.

I read reports on the Internet about sem_timedwait() not having a monotonic
clock but no solutions or workarounds appear to be written in the reports. Does
anyone have a workaround because this seems to be a long-standing
issue/limitation ?

Thanks.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]