Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 96174ac4 authored by Ady Abraham's avatar Ady Abraham
Browse files

Add AIBinder_setMinSchedulerPolicy

Add setMinSchedulerPolicy on AIBinder to be equivalent to the HIDL one.

Test: build
Bug: 203207604
Change-Id: Ifd02ae24d319c365fae85d11496a1017876bd3ba
parent 1dbd7a49
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -780,3 +780,7 @@ AIBinder* AIBinder_fromPlatformBinder(const android::sp<android::IBinder>& binde
    AIBinder_incStrong(ndkBinder.get());
    return ndkBinder.get();
}

void AIBinder_setMinSchedulerPolicy(AIBinder* binder, int policy, int priority) {
    binder->asABBinder()->setMinSchedulerPolicy(policy, priority);
}
+13 −0
Original line number Diff line number Diff line
@@ -55,4 +55,17 @@ __attribute__((weak)) void AIBinder_setRequestingSid(AIBinder* binder, bool requ
 */
__attribute__((weak, warn_unused_result)) const char* AIBinder_getCallingSid() __INTRODUCED_IN(31);

/**
 * Sets a minimum scheduler policy for all transactions coming into this
 * AIBinder.
 *
 * This must be called before the object is sent to another process.
 * Aborts on invalid values. Not thread safe.
 *
 * \param binder local server binder to set the policy for
 * \param policy scheduler policy as defined in linux UAPI
 * \param priority priority. [-20..19] for SCHED_NORMAL, [1..99] for RT
 */
void AIBinder_setMinSchedulerPolicy(AIBinder* binder, int policy, int priority) __INTRODUCED_IN(33);

__END_DECLS
+1 −0
Original line number Diff line number Diff line
@@ -145,6 +145,7 @@ LIBBINDER_NDK33 { # introduced=33
  global:
    AIBinder_Class_disableInterfaceTokenHeader;
    AIBinder_DeathRecipient_setOnUnlinked;
    AIBinder_setMinSchedulerPolicy; # llndk
    AParcel_marshal;
    AParcel_unmarshal;
};