From f39b560952d3706a7ff47ef0d82c1a836daeea42 Mon Sep 17 00:00:00 2001 From: Hans Boehm Date: Wed, 16 Jul 2014 12:13:16 -0700 Subject: Remove 64-bit android_atomic uses from StateQueue. Use stdatomic.h instead. We're trying to remove android_atomic use wherever possible. The 64-bit uses seem easiest to remove first. This cleans up the code, though not as much as C++ would, if it worked everywhere. Change-Id: I3c29bdbd5915cb9d47118834a3a742fe296cf87f --- services/audioflinger/StateQueue.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'services/audioflinger/StateQueue.h') 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 + // 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 -- cgit v1.1