summaryrefslogtreecommitdiffstats
path: root/libs/binder/Binder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/binder/Binder.cpp')
-rw-r--r--libs/binder/Binder.cpp22
1 files changed, 14 insertions, 8 deletions
diff --git a/libs/binder/Binder.cpp b/libs/binder/Binder.cpp
index 1f21f9c..71e62ab 100644
--- a/libs/binder/Binder.cpp
+++ b/libs/binder/Binder.cpp
@@ -39,7 +39,7 @@ IBinder::~IBinder()
// ---------------------------------------------------------------------------
-sp<IInterface> IBinder::queryLocalInterface(const String16& descriptor)
+sp<IInterface> IBinder::queryLocalInterface(const String16& /*descriptor*/)
{
return NULL;
}
@@ -117,19 +117,20 @@ status_t BBinder::transact(
}
status_t BBinder::linkToDeath(
- const sp<DeathRecipient>& recipient, void* cookie, uint32_t flags)
+ const sp<DeathRecipient>& /*recipient*/, void* /*cookie*/,
+ uint32_t /*flags*/)
{
return INVALID_OPERATION;
}
status_t BBinder::unlinkToDeath(
- const wp<DeathRecipient>& recipient, void* cookie, uint32_t flags,
- wp<DeathRecipient>* outRecipient)
+ const wp<DeathRecipient>& /*recipient*/, void* /*cookie*/,
+ uint32_t /*flags*/, wp<DeathRecipient>* /*outRecipient*/)
{
return INVALID_OPERATION;
}
-status_t BBinder::dump(int fd, const Vector<String16>& args)
+ status_t BBinder::dump(int /*fd*/, const Vector<String16>& /*args*/)
{
return NO_ERROR;
}
@@ -142,8 +143,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;
}
@@ -184,7 +190,7 @@ BBinder::~BBinder()
status_t BBinder::onTransact(
- uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags)
+ uint32_t code, const Parcel& data, Parcel* reply, uint32_t /*flags*/)
{
switch (code) {
case INTERFACE_TRANSACTION:
@@ -246,14 +252,14 @@ void BpRefBase::onFirstRef()
android_atomic_or(kRemoteAcquired, &mState);
}
-void BpRefBase::onLastStrongRef(const void* id)
+void BpRefBase::onLastStrongRef(const void* /*id*/)
{
if (mRemote) {
mRemote->decStrong(this);
}
}
-bool BpRefBase::onIncStrongAttempted(uint32_t flags, const void* id)
+bool BpRefBase::onIncStrongAttempted(uint32_t /*flags*/, const void* /*id*/)
{
return mRemote ? mRefs->attemptIncStrong(this) : false;
}