diff options
Diffstat (limited to 'services/audioflinger/StateQueue.h')
-rw-r--r-- | services/audioflinger/StateQueue.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/services/audioflinger/StateQueue.h b/services/audioflinger/StateQueue.h index 9cde642..ef01df7 100644 --- a/services/audioflinger/StateQueue.h +++ b/services/audioflinger/StateQueue.h @@ -17,6 +17,8 @@ #ifndef ANDROID_AUDIO_STATE_QUEUE_H #define ANDROID_AUDIO_STATE_QUEUE_H +#include <stdatomic.h> + // The state queue template class was originally driven by this use case / requirements: // There are two threads: a fast mixer, and a normal mixer, and they share state. // The interesting part of the shared state is a set of active fast tracks, @@ -184,7 +186,7 @@ private: T mStates[kN]; // written by mutator, read by observer // "volatile" is meaningless with SMP, but here it indicates that we're using atomic ops - volatile const T* mNext; // written by mutator to advance next, read by observer + atomic_uintptr_t mNext; // written by mutator to advance next, read by observer volatile const T* mAck; // written by observer to acknowledge advance of next, read by mutator // only used by observer |