Created on 2009-06-16.00:00:00 last changed 174 months ago
Proposed resolution:
For the following functions in [support.start.term].
extern "C" int at_quick_exit(void (*f)(void)); extern "C++" int at_quick_exit(void (*f)(void));
Edit paragraph 10 as follows. The intent is to provide the other half of the happens before relation; to note indeterminate ordering; and to clean up some formatting.
Effects: The
at_quick_exit()functions register the function pointed to byfto be called without arguments whenquick_exitis called. It is unspecified whether a call toat_quick_exit()that does nothappen-beforehappen before (1.10) all calls toquick_exitwill succeed. [Note: theat_quick_exit()functions shall not introduce a data race (17.6.4.7).exitnote—end note] [Note: The order of registration may be indeterminate ifat_quick_exitwas called from more than one thread. —end note] [Note: Theat_quick_exitregistrations are distinct from theatexitregistrations, and applications may need to call both registration functions with the same argument. —end note]
For the following function.
void quick_exit [[noreturn]] (int status)
Edit paragraph 13 as follows. The intent is to note that thread-local variables may be different.
Effects: Functions registered by calls to
at_quick_exitare called in the reverse order of their registration, except that a function shall be called after any previously registered functions that had already been called at the time it was registered. Objects shall not be destroyed as a result of callingquick_exit. If control leaves a registered function called byquick_exitbecause the function does not provide a handler for a thrown exception,terminate()shall be called. [Note: Functions registered by one thread may be called by any thread, and hence should not rely on the identity of thread-storage-duration objects. —end note] After calling registered functions,quick_exitshall call_Exit(status). [Note: The standard file buffers are not flushed. See: ISO C 7.20.4.4. —end note]
[ 2009 Santa Cruz: ]
The "thread safe" language has already been change in the WP. It was changed to "happen before", but the current WP text is still a little incomplete: "happen before" is binary, but the current WP text only mentions one thing.
Move to Ready.
Addresses UK 187
The term "thread safe" is not defined nor used in this context anywhere else in the standard.
Suggested action:
Clarify the meaning of "thread safe".
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2011-08-23 20:07:26 | admin | set | status: wp -> c++11 |
| 2010-10-21 18:28:33 | admin | set | messages: + msg900 |
| 2010-10-21 18:28:33 | admin | set | messages: + msg899 |
| 2009-06-16 00:00:00 | admin | create | |