Title
Incorrect semantics of atomic_init
Status
nad editorial
Section
[atomics.types.operations]
Submitter
INCITS

Created on 2010-08-25.00:00:00 last changed 170 months ago

Messages

Date: 2011-03-05.21:44:45

Proposed resolution:

Change [atomics.types.operations] p. 7 as indicated:

void atomic_init(volatile A *object, C desired);
void atomic_init(A *object, C desired);

7 Effects: Non-atomically assigns the value desired to *objectInitializes *object with value desired. Concurrent access from another thread, even via an atomic operation, constitutes a data race. [Note: This function should only be applied to objects that have been default constructed. These semantics ensure compatibility with C. — end note]

Date: 2010-10-28.22:47:26

Addresses US-171

As of [atomics.types.operations] p. 7:

The atomic_init definition "Non-atomically assigns the value" is not quite correct, as the atomic_init purpose is initialization.

History
Date User Action Args
2010-11-11 19:19:17adminsetstatus: open -> nad editorial
2010-10-28 22:47:26adminsetmessages: + msg5176
2010-10-24 03:04:13adminsetmessages: + msg4958
2010-08-25 00:00:00admincreate