Loading libs/binder/Binder.cpp +15 −3 Original line number Diff line number Diff line Loading @@ -32,9 +32,12 @@ #include <utils/misc.h> #include <inttypes.h> #include <linux/sched.h> #include <stdio.h> #ifdef __linux__ #include <linux/sched.h> #endif #include "RpcState.h" namespace android { Loading Loading @@ -234,11 +237,13 @@ class BBinder::Extras { public: // unlocked objects bool mRequestingSid = false; bool mInheritRt = false; sp<IBinder> mExtension; #ifdef __linux__ int mPolicy = SCHED_NORMAL; int mPriority = 0; #endif bool mRequestingSid = false; bool mInheritRt = false; // for below objects Mutex mLock; Loading Loading @@ -407,6 +412,7 @@ sp<IBinder> BBinder::getExtension() { return e->mExtension; } #ifdef __linux__ void BBinder::setMinSchedulerPolicy(int policy, int priority) { LOG_ALWAYS_FATAL_IF(mParceled, "setMinSchedulerPolicy() should not be called after a binder object " Loading Loading @@ -451,6 +457,7 @@ int BBinder::getMinSchedulerPriority() { if (e == nullptr) return 0; return e->mPriority; } #endif // __linux__ bool BBinder::isInheritRt() { Extras* e = mExtras.load(std::memory_order_acquire); Loading Loading @@ -478,7 +485,12 @@ void BBinder::setInheritRt(bool inheritRt) { } pid_t BBinder::getDebugPid() { #ifdef __linux__ return getpid(); #else // TODO: handle other OSes return 0; #endif // __linux__ } void BBinder::setExtension(const sp<IBinder>& extension) { Loading Loading
libs/binder/Binder.cpp +15 −3 Original line number Diff line number Diff line Loading @@ -32,9 +32,12 @@ #include <utils/misc.h> #include <inttypes.h> #include <linux/sched.h> #include <stdio.h> #ifdef __linux__ #include <linux/sched.h> #endif #include "RpcState.h" namespace android { Loading Loading @@ -234,11 +237,13 @@ class BBinder::Extras { public: // unlocked objects bool mRequestingSid = false; bool mInheritRt = false; sp<IBinder> mExtension; #ifdef __linux__ int mPolicy = SCHED_NORMAL; int mPriority = 0; #endif bool mRequestingSid = false; bool mInheritRt = false; // for below objects Mutex mLock; Loading Loading @@ -407,6 +412,7 @@ sp<IBinder> BBinder::getExtension() { return e->mExtension; } #ifdef __linux__ void BBinder::setMinSchedulerPolicy(int policy, int priority) { LOG_ALWAYS_FATAL_IF(mParceled, "setMinSchedulerPolicy() should not be called after a binder object " Loading Loading @@ -451,6 +457,7 @@ int BBinder::getMinSchedulerPriority() { if (e == nullptr) return 0; return e->mPriority; } #endif // __linux__ bool BBinder::isInheritRt() { Extras* e = mExtras.load(std::memory_order_acquire); Loading Loading @@ -478,7 +485,12 @@ void BBinder::setInheritRt(bool inheritRt) { } pid_t BBinder::getDebugPid() { #ifdef __linux__ return getpid(); #else // TODO: handle other OSes return 0; #endif // __linux__ } void BBinder::setExtension(const sp<IBinder>& extension) { Loading