pthread_mutex_timedlock can not be used with CLOCK_MONOTONIC?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all

I have a question regarding pthread_mutex:

Currently I am utilizing the pthread library. Everything seems to work fine with the exception of timeouts when attempting to set the CLOCK_REALTIME to a different time. This will cause the timeout to trigger later/earlier than expected depending on if you set the time forwards of backwards, changing the time is done by settimeofday(...).
 
The first attempt of a solution was to use a different clock (CLOCK_MONOTONIC), which works fine when using conditional attributes (pthread_condattr_setclock in combination with pthread_cond_init) but unfortunately there does not seem to be a corresponding pthread_mutex_setclock(MISSING) for pthread_mutex_init.
 
Is there an good alternative for pthread or can the pthread library somehow be utilized for this purpose?

4.19.79-rt28-g5baf382c8f #1 SMP PREEMPT RT Tue Mar 10 07:30:26 UTC 2020 armv7l armv7l armv7l GNU/Linux

Any help is highly appreciated.

Thanx
Andy








[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux