Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/atomic/atomic flag"

From cppreference.com
< cpp‎ | atomic
m (item template and corrected wording for ctor)
m (dcl item templates)
Line 14: Line 14:
 
{{dcl list mem ctor | cpp/atomic/atomic_flag/atomic_flag  | constructs an atomic_flag }}
 
{{dcl list mem ctor | cpp/atomic/atomic_flag/atomic_flag  | constructs an atomic_flag }}
 
{{dcl list mem fun  | cpp/atomic/atomic_flag/operator{{=}} | the assignment operator }}
 
{{dcl list mem fun  | cpp/atomic/atomic_flag/operator{{=}} | the assignment operator }}
{{dcl list mem fun  | cpp/atomic/atomic_flag/clear | atomically sets flag to {{cpp|false}} }}
+
{{dcl list template | cpp/atomic/atomic_flag/dcl list clear}}
{{dcl list mem fun  | cpp/atomic/atomic_flag/test_and_set | atomically sets the flag to {{cpp|true}} and obtains its previous value }}
+
{{dcl list template | cpp/atomic/atomic_flag/dcl list test_and_set}}
 
{{dcl list end}}
 
{{dcl list end}}
  
Line 53: Line 53:
 
===See also===
 
===See also===
 
{{dcl list begin}}
 
{{dcl list begin}}
{{dcl list fun | cpp/atomic/atomic_flag_test_and_set | title=atomic_flag_test_and_set<br>atomic_flag_test_and_set_explicit | atomically sets the flag to {{cpp|true}} and returns its previous value | notes={{mark c++11}}<br>{{mark c++11}}}}
+
{{dcl list template | cpp/atomic/dcl list atomic_flag_test_and_set}}
{{dcl list fun | cpp/atomic/atomic_flag_clear | title=atomic_flag_clear<br>atomic_flag_clear_explicit | atomically sets the value of the flag to {{cpp|false}} | notes={{mark c++11}}<br>{{mark c++11}} }}
+
{{dcl list template | cpp/atomic/dcl list atomic_flag_clear}}
 
{{dcl list template | cpp/atomic/dcl list ATOMIC_FLAG_INIT}}
 
{{dcl list template | cpp/atomic/dcl list ATOMIC_FLAG_INIT}}
 
{{dcl list end}}
 
{{dcl list end}}

Revision as of 06:28, 20 September 2011

Template:cpp/atomic/sidebar Template:ddcl list begin <tr class="t-dsc-header">

<td>
Defined in header <atomic>
</td>

<td></td> <td></td> </tr> <tr class="t-dcl ">

<td >
class atomic_flag;
</td>

<td class="t-dcl-nopad"> </td> <td > Template:mark c++11 feature </td> </tr> Template:ddcl list end

An Template:cpp is an atomic boolean type. Unlike all specializations of Template:cpp, it is guaranteed to be lock-free.

Member functions

Template:cpp/atomic/atomic flag/dcl list clearTemplate:cpp/atomic/atomic flag/dcl list test and set
constructs an atomic_flag
(public member function)
the assignment operator
(public member function)

Example

Template:example cpp

See also

Template:cpp/atomic/dcl list atomic flag test and setTemplate:cpp/atomic/dcl list atomic flag clearTemplate:cpp/atomic/dcl list ATOMIC FLAG INIT