Title
Various threading bugs #18
Status
c++11
Section
[thread.mutex.requirements]
Submitter
Pete Becker

Created on 2009-01-07.00:00:00 last changed 162 months ago

Messages

Date: 2010-10-21.18:28:33

Proposed resolution:

Change Exceptions [thread.req.exception] as indicated:

Some functions described in this Clause are specified to throw exceptions of type system_error (19.5.5). Such exceptions shall be thrown if any of the Error conditions are detected or a call to an operating system or other underlying API results in an error that prevents the library function from meeting its specifications. [Note: See [res.on.exception.handling] for exceptions thrown to report storage allocation failures. —end note]

[Example:

Consider a function in this clause that is specified to throw exceptions of type system_error and specifies Error conditions that include operation_not_permitted for a thread that does not have the privilege to perform the operation. Assume that, during the execution of this function, an errno of EPERM is reported by a POSIX API call used by the implementation. Since POSIX specifies an errno of EPERM when "the caller does not have the privilege to perform the operation", the implementation maps EPERM  to an error_condition of operation_not_permitted ([syserr]) and an exception of type system_error is thrown.

—end example]

Editorial note: For the sake of exposition, the existing text above is shown with the changes proposed in issues 962 and 967. The proposed additional example is independent of whether or not the 962 and 967 proposed resolutions are accepted.

Change Mutex requirements [thread.mutex.requirements], paragraph 4, as indicated:

operation_not_permitted — if the thread does not have the necessary permission to change the state of the mutex object privilege to perform the operation.

Change Mutex requirements [thread.mutex.requirements], paragraph 12, as indicated:

operation_not_permitted — if the thread does not have the necessary permission to change the state of the mutex privilege to perform the operation.

Date: 2010-10-21.18:28:33

[ 2009-10 Santa Cruz: ]

Moved to Ready with minor word-smithing in the example.

Date: 2010-10-21.18:28:33

[ Beman has volunteered to provide proposed wording. ]

Date: 2010-10-21.18:28:33

[ Summit: ]

Move to open.

Date: 2009-01-07.00:00:00

[thread.mutex.requirements]: several functions are required to throw exceptions "if the thread does not have the necessary permission ...". "The necessary permission" is not defined.

History
Date User Action Args
2011-08-23 20:07:26adminsetstatus: wp -> c++11
2010-10-21 18:28:33adminsetmessages: + msg4613
2010-10-21 18:28:33adminsetmessages: + msg4612
2010-10-21 18:28:33adminsetmessages: + msg4611
2010-10-21 18:28:33adminsetmessages: + msg4610
2009-01-07 00:00:00admincreate