equal
deleted
inserted
replaced
93 return Atomic::load(&_state); |
93 return Atomic::load(&_state); |
94 } |
94 } |
95 |
95 |
96 static AttachListenerState transit_state(AttachListenerState new_state, |
96 static AttachListenerState transit_state(AttachListenerState new_state, |
97 AttachListenerState cmp_state) { |
97 AttachListenerState cmp_state) { |
98 return Atomic::cmpxchg(new_state, &_state, cmp_state); |
98 return Atomic::cmpxchg(&_state, cmp_state, new_state); |
99 } |
99 } |
100 |
100 |
101 static bool is_initialized() { |
101 static bool is_initialized() { |
102 return Atomic::load(&_state) == AL_INITIALIZED; |
102 return Atomic::load(&_state) == AL_INITIALIZED; |
103 } |
103 } |