summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/StateQueue.h
diff options
context:
space:
mode:
authorHans Boehm <hboehm@google.com>2014-07-23 23:25:18 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-07-23 23:25:18 +0000
commit9eba0a74a1fa9aabb7f7078a32c591bc7f0a7168 (patch)
tree5cb83b6691ceae4483d490c3b939a8bc1576f59e /services/audioflinger/StateQueue.h
parentbf4bf9040669eb0de993cb1db35b0ec39b6463dd (diff)
parent3879792f62e0d3eac295c703c1968a82022fddb1 (diff)
downloadframeworks_av-9eba0a74a1fa9aabb7f7078a32c591bc7f0a7168.zip
frameworks_av-9eba0a74a1fa9aabb7f7078a32c591bc7f0a7168.tar.gz
frameworks_av-9eba0a74a1fa9aabb7f7078a32c591bc7f0a7168.tar.bz2
am 3879792f: Merge "Remove 64-bit android_atomic uses from StateQueue."
* commit '3879792f62e0d3eac295c703c1968a82022fddb1': Remove 64-bit android_atomic uses from StateQueue.
Diffstat (limited to 'services/audioflinger/StateQueue.h')
-rw-r--r--services/audioflinger/StateQueue.h4
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