diff options
Diffstat (limited to 'libs/binder/Binder.cpp')
-rw-r--r-- | libs/binder/Binder.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/libs/binder/Binder.cpp b/libs/binder/Binder.cpp index 6ca3b16324..2e734b26cc 100644 --- a/libs/binder/Binder.cpp +++ b/libs/binder/Binder.cpp @@ -133,6 +133,7 @@ class BBinder::Extras public: // unlocked objects bool mRequestingSid = false; + bool mInheritRt = false; sp<IBinder> mExtension; int mPolicy = SCHED_NORMAL; int mPriority = 0; @@ -323,6 +324,27 @@ int BBinder::getMinSchedulerPriority() { return e->mPriority; } +bool BBinder::isInheritRt() { + Extras* e = mExtras.load(std::memory_order_acquire); + + return e && e->mInheritRt; +} + +void BBinder::setInheritRt(bool inheritRt) { + Extras* e = mExtras.load(std::memory_order_acquire); + + if (!e) { + if (!inheritRt) { + return; + } + + e = getOrCreateExtras(); + if (!e) return; // out of memory + } + + e->mInheritRt = inheritRt; +} + pid_t BBinder::getDebugPid() { return getpid(); } |