The relative timeout in linuxthreads

H . J . Lu hjl@lucon.org
Wed Feb 6 16:01:00 GMT 2002


On Thu, Feb 07, 2002 at 12:46:47AM +0100, Marcus Brinkmann wrote:
> 
> You were not very specific about the exact situation you want to fix, and
> what guarantees you want to make, but the above is what I read from the
> standard about absolute and relative time outs.
> 

Suppose the machine starts with

# date
Thu Feb  6 20:34:00 PST 2020

and a thread wants to wait for 30 seconds. Then the machine notices
the clock is way off. The clock is set with

# rdate -s clockserver
# date
Wed Feb  6 15:42:35 PST 2002

Since pthread waits in the absolute time, that pthread won't time out
until 2020 :-).



H.J.



More information about the Libc-alpha mailing list