Subject: Re: sleep is not arware of suspend mode

From: Julian Bradfield <[email-masked]>
Date: Fri, 18 Jan 2013 07:45:49 +0000

I've just come across this thread, as I was trying to work out who was
responsible for this (IMHO) undoubted bug. I wanted to respond to
Pádraig's last comment.

Pádraig said:

> POSIX states that:
> 
> "Setting  the  value  of  the CLOCK_REALTIME clock via clock_set-
>  time(2) shall have no effect on threads that are blocked waiting
>  for a relative time service based upon this clock"

I strongly suspect that this is an infelicity in the expression of the
intended specification. Obviously relative CLOCK_REALTIME waits should
not be be affected if the time changes because it's been set
wrong. But that's a different matter from changing it because real
time has elapsed without it noticing. Posix was not really written
with modern systems in mind.
(Leaving aside the question of whether adjusting the time after resume
is done by userspace calling clock_settime() !)

-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.