Use of the information contained in this unapproved document is at your own risk
.Last update: 30 March,1998
1003.1c-95 #28
_____________________________________________________________________________
Interpretation Number: XXXX
Topic: Waiting on a Condition Errors
Relevant Sections: 11.4.4.4
Interpretation Request: (Defect Report)
-----------------------
Date: Tue, 27 Aug 1996 15:27:10 -0400
From: Dave Butenhof <butenhof@zko.dec.com>
Standard: 9945-1:1996 (1003.1, 1996 Edition)
2. Section 11.4.4.4, Waiting on a Condition Errors
All error conditions, except ETIMEDOUT for pthread_cond_timedwait,
are reported by returning EINVAL. One of the error conditions in
particular, "the mutex was not owned by the current thread at the
time of the call" is an error that would be detected by unlocking
the specified mutex prior to waiting. This same error is reported
by pthread_mutex_unlock by returning the error EPERM. The standard
should not report the same error in different places using
different error codes. This error should be reported by returning
EPERM for both pthread_cond_wait and pthread_cond_timedwait.
REF: page 266, section 11.4.4.4, lines 898,899
page 258, section 11.3.3.4, line 615
Interpretation response
------------------------
The standard is clear that pthread_cond_timedwait should report EINVAL when the
mutex was not owned by the current thread at the time of the call and a
conforming implementation must return that value. The
interpretations committee believes that this is not what was intended and
has referred the issue to the sponsor for consideration.
Rationale
-------------
None.
Forwarded to Interpretations group: August 29 1996
Proposed resolution: 18 Sep 96
Finalised: 26 Sep 96