summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2014-05-23 19:34:00 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-05-23 19:34:00 +0000
commit24ffe7a9161943c8ba2353e956653a71af564b5d (patch)
tree8bcf08421a8dc8e92b61c5877a7378ef23a86098
parentd6b1efbc99de43d56aa6a4123126e994e7c2c30e (diff)
parent79262cfc14a9d8b5aa29d43e84ea91eedb9492ba (diff)
downloadframeworks_av-24ffe7a9161943c8ba2353e956653a71af564b5d.zip
frameworks_av-24ffe7a9161943c8ba2353e956653a71af564b5d.tar.gz
frameworks_av-24ffe7a9161943c8ba2353e956653a71af564b5d.tar.bz2
am 79262cfc: am 5b756bfd: am 8b187f4a: Merge "Move frameworks/av off <sys/atomics.h>."
* commit '79262cfc14a9d8b5aa29d43e84ea91eedb9492ba': Move frameworks/av off <sys/atomics.h>.
-rw-r--r--media/libstagefright/MediaBuffer.cpp5
-rw-r--r--services/audioflinger/FastMixer.cpp1
2 files changed, 2 insertions, 4 deletions
diff --git a/media/libstagefright/MediaBuffer.cpp b/media/libstagefright/MediaBuffer.cpp
index 11b80bf..8af0880 100644
--- a/media/libstagefright/MediaBuffer.cpp
+++ b/media/libstagefright/MediaBuffer.cpp
@@ -27,7 +27,6 @@
#include <media/stagefright/MetaData.h>
#include <ui/GraphicBuffer.h>
-#include <sys/atomics.h>
namespace android {
@@ -92,7 +91,7 @@ void MediaBuffer::release() {
return;
}
- int prevCount = __atomic_dec(&mRefCount);
+ int prevCount = __sync_fetch_and_sub(&mRefCount, 1);
if (prevCount == 1) {
if (mObserver == NULL) {
delete this;
@@ -112,7 +111,7 @@ void MediaBuffer::claim() {
}
void MediaBuffer::add_ref() {
- (void) __atomic_inc(&mRefCount);
+ (void) __sync_fetch_and_add(&mRefCount, 1);
}
void *MediaBuffer::data() const {
diff --git a/services/audioflinger/FastMixer.cpp b/services/audioflinger/FastMixer.cpp
index 6f347ee..130a7e7 100644
--- a/services/audioflinger/FastMixer.cpp
+++ b/services/audioflinger/FastMixer.cpp
@@ -26,7 +26,6 @@
#define ATRACE_TAG ATRACE_TAG_AUDIO
#include "Configuration.h"
-#include <sys/atomics.h>
#include <time.h>
#include <utils/Log.h>
#include <utils/Trace.h>