Skip to content

Files

Latest commit

 

History

History
52 lines (31 loc) · 1.09 KB

atomic_flag_test_and_set.adoc

File metadata and controls

52 lines (31 loc) · 1.09 KB

atomic_flag_test_and_set functions

Atomically sets the value pointed to by object to true.

bool atomic_flag_test_and_set(volatile atomic_flag *object)

bool atomic_flag_test_and_set_explicit(volatile atomic_flag *object,
                                       memory_order order)

bool atomic_flag_test_and_set_explicit(volatile atomic_flag *object,
                                       memory_order order,
                                       memory_scope scope)

Parameters

object
order
scope

== Description

Atomically sets the value pointed to by object to true. Memory is affected according to the value of order. These operations are atomic read-modify-write operations (as defined by section 5.1.2.4 of the C11 specification). Returns atomically, the value of the object immediately before the effects.