Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

c

What is atomic_flag_clear_explicit in C?

Faraz Karim

What it does

atomic_flag_clear_explicit is defined in the stdatomic.h header file and serves to change the value of an atomic flag to false. What makes atomic_flag_clear_explicit different from atomic_flag_clear is that the former also requires the user to specify the synchronization mode to use.

Syntax

The syntax for the function declaration is as follows:

Parameters

atomic_flag_clear takes a two, mandatory parameter:

  • flg: A pointer to an atomic_flag object.

  • sync_mode: The value for the memory synchronization mode. This is of type memory_order.

Return value

atomic_flag_clear_explicit does not return anything.

RELATED TAGS

c

CONTRIBUTOR

Faraz Karim
Copyright ©2022 Educative, Inc. All rights reserved
RELATED COURSES

View all Courses

Keep Exploring