다음을 통해 공유


atomic_flag_test_and_set Function

Sets the bool flag in an atomic_flag object to true, within the constraints of the memory_order_seq_cstmemory_order.

inline bool atomic_flag_test_and_set(
   volatile atomic_flag *Flag,
) _NOEXCEPT;
inline bool atomic_flag_test_and_set(
   atomic_flag *Flag,
) _NOEXCEPT;

Parameters

  • Flag
    A pointer to an atomic_flag object.

Return Value

The initial value of Flag.

Requirements

Header: atomic

Namespace: std

See Also

Reference

<atomic>