clone 381481 -1
severity -1 wishlist
retitle -1 pthread_cond_timedwait documentation appears to state an invariant
that does not hold.
reassign -1 glibc-doc
thanks
On Mon, Sep 11, 2006 at 05:07:03PM +0200, Julien Danjou <[EMAIL PROTECTED]> was
heard to say:
> reassign 381481 aptitude
> thanks
>
> > On Fri, Aug 11, 2006 at 06:54:43AM -0700, Daniel Burrows wrote:
> > > > | ......................
> > > > | rval == -1080447064
> > > > |
> > > > | now2.tv_sec == 1155053066
> > > > | now.tv_sec + 2 == 1155053066
> > > > | now2.tv_usec == 882203
> > > > | now.tv_usec == 887661
> > > > | F.............
> > >
> > > Hm. I'm inclined to close this as a bug in xen --
> > > pthread_cond_timedwait should never ever return success if it hasn't
> > > waited long enough, which is what appears to be happening. [0] Does xen
> > > play games with the system clock?
> >
> > I really think so. Consequently, I reassign this bug to Xen.
> > And thanks for your good explanation!
>
> 17:04 < waldi> jd_: please assign #381481 back, they assume that
> gettimeofday is more accurate than the timer frequency
pthread_cond_timedwait(3) says:
The !pthread_cond_timedwait! function returns the following error codes
on error:
!ETIMEDOUT!
the condition variable was not signaled until the timeout
specified by |abstime|
...
If this isn't actually guaranteed, I guess it's a documentation bug.
I'll remove the test for the invariant that isn't. (the purpose of
those tests is to make sure my threading layer has the same semantics as
the underlying code, so it doesn't make sense to have tests for stuff
that's not guaranteed)
To the glibc-doc maintainer:
If I'm interpreting the IRC comment above correctly,
pthread_cond_timedwait is allowed to return earlier than the specified
timeout. Probably the text above should say something like "...not
signaled until approximately the timeout specified by |abstime|. This
function may return both later AND earlier than |abstime|."
Daniel
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]