Atomically set the bit true return @c true if the bit was changed, @c false if not.
| 49 | // Atomically set the bit true |
| 50 | // return @c true if the bit was changed, @c false if not. |
| 51 | bool |
| 52 | test_and_set() |
| 53 | { |
| 54 | return compare_exchange(true); |
| 55 | } |
| 56 | |
| 57 | // allows assign by bool |
| 58 | // @return The new value of the bit. |