diff options
Diffstat (limited to 'libs/binder/Binder.cpp')
-rw-r--r-- | libs/binder/Binder.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/binder/Binder.cpp b/libs/binder/Binder.cpp index 1f21f9c..320bdea 100644 --- a/libs/binder/Binder.cpp +++ b/libs/binder/Binder.cpp @@ -142,8 +142,13 @@ void BBinder::attachObject( if (!e) { e = new Extras; +#ifdef __LP64__ + if (android_atomic_release_cas64(0, reinterpret_cast<int64_t>(e), + reinterpret_cast<volatile int64_t*>(&mExtras)) != 0) { +#else if (android_atomic_cmpxchg(0, reinterpret_cast<int32_t>(e), reinterpret_cast<volatile int32_t*>(&mExtras)) != 0) { +#endif delete e; e = mExtras; } |