Created on 2022-01-18.00:00:00 last changed 13 months ago
Proposed resolution:
This wording is relative to N4910.
Modify [atomics.syn], Header <atomic> synopsis, as indicated:
void atomic_flag_notify_all(volatile atomic_flag*) noexcept; void atomic_flag_notify_all(atomic_flag*) noexcept; #define ATOMIC_FLAG_INIT see below // [atomics.fences], fences extern "C" void atomic_thread_fence(memory_order) noexcept; extern "C" void atomic_signal_fence(memory_order) noexcept;
Move the content of [depr.atomics.flag] from Annex D to the end of [atomics.flag].
#define ATOMIC_FLAG_INIT see belowRemarks: The macro
ATOMIC_FLAG_INIT
is defined in such a way that it can be used to initialize an object of typeatomic_flag
to the clear state. The macro can be used in the form:atomic_flag guard = ATOMIC_FLAG_INIT;It is unspecified whether the macro can be used in other initialization contexts. For a complete static-duration object, that initialization shall be static.
Modify [stdatomic.h.syn] C compatibility, as indicated:
using std::atomic_flag_clear; // see below using std::atomic_flag_clear_explicit; // see below #define ATOMIC_FLAG_INIT see below using std::atomic_thread_fence; // see below using std::atomic_signal_fence; // see below
Modify [depr.atomics.general] in Annex D as indicated:
#define ATOMIC_VAR_INIT(value) see below#define ATOMIC_FLAG_INIT see below}
[ 2022-07-25 Approved at July 2022 virtual plenary. Status changed: Ready → WP. ]
[ 2022-07-15; LWG telecon: move to Ready ]
[ 2022-07-11; Reflector poll ]
Set status to Tentatively Ready after six votes in favour during reflector poll.
[ 2022-07-06; SG1 confirm the direction, Jonathan adds wording ]
"In response to LWG 3659, add ATOMIC_FLAG_INIT to <stdatomic.h> as undeprecated."
SF | F | N | A | SA |
3 | 0 | 0 | 0 | 0 |
"In response to LWG 3659, undeprecate ATOMIC_FLAG_INIT in <atomic>."
SF | F | N | A | SA |
2 | 3 | 1 | 0 | 0 |
[ 2022-01-30; Reflector poll ]
Set priority to 3 after reflector poll. Send to SG1.
P0883R2 deprecated ATOMTIC_VAR_INIT and ATOMIC_FLAG_INIT largely based on rationale from WG14. However, WG14 only deprecated ATOMIC_VAR_INIT because we were told by implementers that ATOMIC_FLAG_INIT is still necessary for some platforms (platforms for which "clear" is actually not all zero bits, which I guess exist).
I'd like to explore whether WG21 should undeprecate ATOMIC_FLAG_INIT as there was no motivation that I could find in the paper on the topic or in the discussion at P0883R0 [Jacksonville 2018]. One possible approach would be to undeprecate it from <stdatomic.h> only (C++ can still use the constructors from <atomic> and shared code can use the macros from <stdatomic.h>).History | |||
---|---|---|---|
Date | User | Action | Args |
2023-11-22 15:47:43 | admin | set | status: wp -> c++23 |
2022-07-25 20:32:58 | admin | set | messages: + msg12636 |
2022-07-25 20:32:58 | admin | set | status: ready -> wp |
2022-07-25 20:28:19 | admin | set | messages: + msg12610 |
2022-07-11 10:09:12 | admin | set | messages: + msg12576 |
2022-07-11 10:09:12 | admin | set | status: open -> ready |
2022-07-06 20:36:49 | admin | set | messages: + msg12557 |
2022-07-06 20:36:49 | admin | set | messages: + msg12556 |
2022-01-30 17:05:36 | admin | set | messages: + msg12329 |
2022-01-30 17:05:36 | admin | set | status: new -> open |
2022-01-18 00:00:00 | admin | create |