diff options
author | Kévin PETIT <kevin.petit@arm.com> | 2014-02-03 12:35:36 +0000 |
---|---|---|
committer | Narayan Kamath <narayan@google.com> | 2014-02-11 11:40:06 +0000 |
commit | 377b2ec9a2885f9b6405b07ba900a9e3f4349c38 (patch) | |
tree | b938e1d75a1beefae86244f287ca22f4a277740d /services/audioflinger/StateQueue.cpp | |
parent | cdda7bf4d3ca9cad6979374a18dd5be79ea83d80 (diff) | |
download | frameworks_av-377b2ec9a2885f9b6405b07ba900a9e3f4349c38.zip frameworks_av-377b2ec9a2885f9b6405b07ba900a9e3f4349c38.tar.gz frameworks_av-377b2ec9a2885f9b6405b07ba900a9e3f4349c38.tar.bz2 |
Make frameworks/av 64-bit compatible
Contains the necessary changes to make frameworks/av build and work
on a 64-bit machine.
Signed-off-by: Craig Barber <craig.barber@arm.com>
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
Change-Id: I725feaae50ed8eee25ca2c947cf15aee1f395c43
Diffstat (limited to 'services/audioflinger/StateQueue.cpp')
-rw-r--r-- | services/audioflinger/StateQueue.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/services/audioflinger/StateQueue.cpp b/services/audioflinger/StateQueue.cpp index c2d3bbd..48399c0 100644 --- a/services/audioflinger/StateQueue.cpp +++ b/services/audioflinger/StateQueue.cpp @@ -58,7 +58,11 @@ template<typename T> StateQueue<T>::~StateQueue() template<typename T> const T* StateQueue<T>::poll() { +#ifdef __LP64__ + const T *next = (const T *) android_atomic_acquire_load64((volatile int64_t *) &mNext); +#else const T *next = (const T *) android_atomic_acquire_load((volatile int32_t *) &mNext); +#endif if (next != mCurrent) { mAck = next; // no additional barrier needed mCurrent = next; @@ -140,7 +144,11 @@ template<typename T> bool StateQueue<T>::push(StateQueue<T>::block_t block) } // publish +#ifdef __LP64__ + android_atomic_release_store64((int64_t) mMutating, (volatile int64_t *) &mNext); +#else android_atomic_release_store((int32_t) mMutating, (volatile int32_t *) &mNext); +#endif mExpecting = mMutating; // copy with circular wraparound |