Allow setting a minimum scheduler policy for a service.
The binder kernel driver supports priority inheritance
at a node (service)-basis, that makes sure all transactions
into that service are executed at a specified minimum
scheduler policy and priority.
This change allows users of HIDL interfaces to set
such a policy for their interface.
Bug: 37293077
Bug: 63899698
Test: verified min_prio in /d/binder output
Merged-In: If72dd8322381246832b460c386dda44fbd225757
Change-Id: If72dd8322381246832b460c386dda44fbd225757
diff --git a/transport/include/hidl/Static.h b/transport/include/hidl/Static.h
index e6c9139..0133ff7 100644
--- a/transport/include/hidl/Static.h
+++ b/transport/include/hidl/Static.h
@@ -28,12 +28,19 @@
namespace hardware {
namespace details {
+struct SchedPrio {
+ int sched_policy;
+ int prio;
+};
+
// For HidlBinderSupport and autogenerated code
// value function receives reinterpret_cast<void *>(static_cast<IFoo *>(foo)),
// returns sp<IBinder>
extern ConcurrentMap<std::string,
std::function<sp<IBinder>(void *)>> gBnConstructorMap;
+extern ConcurrentMap<wp<::android::hidl::base::V1_0::IBase>, SchedPrio> gServicePrioMap;
+
// For HidlPassthroughSupport and autogenerated code
// value function receives reinterpret_cast<void *>(static_cast<IFoo *>(foo)),
// returns sp<IBase>