View Issue Details

IDProjectCategoryView StatusLast Update
00011621003.1(2008)/Issue 7System Interfacespublic2024-06-11 08:52
ReporterVillemoes Assigned Toajosey  
PrioritynormalSeverityEditorialTypeClarification Requested
Status ClosedResolutionAccepted As Marked 
NameRasmus Villemoes
Organization
User Reference
Sectionpthread_cond_timedwait
Page Number1617
Line Number52757-52759
Interp Status---
Final Accepted TextSee 0001162:0004230
Summary0001162: EOWNERDEAD must have precedence over ETIMEDOUT
DescriptionIf a thread wakes up from a pthread_cond_timedwait due to the deadline passing, and when trying to reacquire the mutex finds it in an EOWNERDEAD state, the return value from the pthread_cond_timedwait must be EOWNERDEAD rather than ETIMEDOUT - but AFAICT, this is not explicitly stated in the specification. The closest mention I can find is

  If mutex is a robust mutex where an owner terminated while holding the lock and the state is recoverable, the mutex shall be acquired even though the function returns an error code.

but "an error code" doesn't preclude ETIMEDOUT.

(If the application wants to know whether the deadline has passed, it can always do that with an extra call to clock_gettime, but it has no way of detecting the EOWNERDEAD state.)
Desired ActionClarify which return value the application can expect when a condition variable is used with a robust mutex.
Tagstc3-2008

Activities

nick

2019-01-28 16:25

manager   bugnote:0004230

Last edited: 2019-01-28 16:26

At page 1617 line 52759 change:

If mutex is a robust mutex where an owner terminated while holding the lock and the
state is recoverable, the mutex shall be acquired even though the function returns an error code.

to a new paragraph (clarifying that this is not a successful return, even though the mutex is acquired)

If mutex is a robust mutex where an owner terminated while holding the lock and the
state is recoverable, the mutex shall be acquired even though the function returns [EOWNERDEAD].


Issue History

Date Modified Username Field Change
2017-09-20 12:18 Villemoes New Issue
2017-09-20 12:18 Villemoes Status New => Under Review
2017-09-20 12:18 Villemoes Assigned To => ajosey
2017-09-20 12:18 Villemoes Name => Rasmus Villemoes
2017-09-20 12:18 Villemoes Section => pthread_cond_timedwait
2019-01-24 17:19 nick Page Number => 1617
2019-01-24 17:19 nick Line Number => 52757-52759
2019-01-24 17:19 nick Interp Status => ---
2019-01-28 16:25 nick Note Added: 0004230
2019-01-28 16:26 nick Final Accepted Text => See 0001162:0004230
2019-01-28 16:26 nick Status Under Review => Resolved
2019-01-28 16:26 nick Resolution Open => Accepted As Marked
2019-01-28 16:26 nick Tag Attached: tc3-2008
2019-01-28 16:26 nick Note Edited: 0004230
2019-11-07 09:41 geoffclare Status Resolved => Applied
2024-06-11 08:52 agadmin Status Applied => Closed