| To: | yyyyyyyyyyyyyyy@xxxxxxxxxxxxx |
|---|---|
| Subject: | Defect in XSH pthread_cond_timedwait() |
| From: | yyyyyyyy@xxxxxx |
| Date: | Fri, 11 Jul 2003 17:15:12 +0100 (BST) |
Defect report from : Alexander Terekhov , IBM
(Please direct followup comments direct to yyyyyyyyyyyyyy@xxxxxxxxxxxxx)
@ page 1036 line 32668-32671 section pthread_cond_timedwait() comment
{alt-cv.timedwait-2003-07-11}
Problem:
Edition of Specification (Year): 2003
Defect code : 3. Clarification required
The standard says:
<quote source=32668-32671>
The pthread_cond_timedwait() function shall be equivalent to
pthread_cond_wait(), except that an error is returned if the
absolute time specified by abstime passes (that is, system time
equals or exceeds abstime) before the condition cond is signaled
or broadcasted, or if the absolute time specified by abstime has
already been passed at the time of the call.
</quote>
It isn't clear (you might want but not need to follow the link
that can be found below) whether a thread that has been unblocked
because its wait has been timedout while blocked in a call to
pthread_cond_timedwait() may consume a condition signal that may
be directed concurrently at the condition variable if there are
other threads blocked on the condition variable.
http://google.com/groups?threadm=bej397%24ho9%241%40nntp.webmaster.com
(Subject: Strange mutex question, can a timeout satisfy a signal?)
Action:
add the following (or something like that) after 32671:
A thread that has been unblocked because its wait has been
timedout while blocked in a call to pthread_cond_timedwait()
may consume a condition signal (not more than one) that may
be directed concurrently at the condition variable even if
there are other threads blocked on the condition variable.
-OR- (I really don't like it, but others disagree)
add the following (or something like that) after 32671:
A thread that has been unblocked because its wait has been
timedout while blocked in a call to pthread_cond_timedwait()
shall not consume any condition signal that may be directed
concurrently at the condition variable if there are other
threads blocked on the condition variable.
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Defect in XSH pthread_sigmask, loic-dev |
|---|---|
| Next by Date: | Re: Defect in XSH pthread_sigmask, s lurndal |
| Previous by Thread: | Defect in XSH pthread_cond_timedwait(), drepper |
| Next by Thread: | Bug in XSHtc1-d3 nanosleep, Jon Hitchcock |
| Indexes: | [Date] [Thread] [All Lists] |