This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of C++11 status.
Section: 33.6.4 [thread.mutex.requirements] Status: C++11 Submitter: Pete Becker Opened: 2009-01-07 Last modified: 2016-01-28
Priority: Not Prioritized
View other active issues in [thread.mutex.requirements].
View all other issues in [thread.mutex.requirements].
View all issues with C++11 status.
Discussion:
33.6.4 [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.
[ Summit: ]
Move to open.
[ Beman has volunteered to provide proposed wording. ]
[ 2009-10 Santa Cruz: ]
Moved to Ready with minor word-smithing in the example.
Proposed resolution:
Change Exceptions 33.2.2 [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 16.4.6.13 [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 includeoperation_not_permitted
for a thread that does not have the privilege to perform the operation. Assume that, during the execution of this function, anerrno
ofEPERM
is reported by a POSIX API call used by the implementation. Since POSIX specifies anerrno
ofEPERM
when "the caller does not have the privilege to perform the operation", the implementation mapsEPERM
to anerror_condition
ofoperation_not_permitted
(19.5 [syserr]) and an exception of typesystem_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 33.6.4 [thread.mutex.requirements], paragraph 4, as indicated:
—
operation_not_permitted
— if the thread does not have thenecessary permission to change the state of the mutex objectprivilege to perform the operation.
Change Mutex requirements 33.6.4 [thread.mutex.requirements], paragraph 12, as indicated:
—
operation_not_permitted
— if the thread does not have thenecessary permission to change the state of the mutexprivilege to perform the operation.