|
Nebula
|
#include <safeflag.h>
A thread-safe flag variable.
Public Member Functions | |
| SafeFlag () | |
| constructor | |
| void | Set () |
| set the flag | |
| void | Clear () |
| clear the flag | |
| bool | Test () const |
| test if the flag is set | |
| bool | TestAndClearIfSet () |
| test if flag is set, if yes, clear flag | |
Private Attributes | |
| int volatile | flag |
|
inline |
constructor
|
inline |
clear the flag
|
inline |
set the flag
|
inline |
test if the flag is set
|
inline |
test if flag is set, if yes, clear flag
|
private |