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

Commit ee449711 authored by Steven Moreland's avatar Steven Moreland Committed by Automerger Merge Worker
Browse files

Merge "libbinder_ndk: _disableBackgroundScheduling" into main am: 46e32381 am: 5a868847

parents 582a3135 5a868847
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -62,6 +62,8 @@ __attribute__((weak, warn_unused_result)) const char* AIBinder_getCallingSid() _
 * This must be called before the object is sent to another process.
 * Aborts on invalid values. Not thread safe.
 *
 * This overrides the setting in ABinderProcess_disableBackgroundScheduling.
 *
 * \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
+13 −0
Original line number Diff line number Diff line
@@ -74,6 +74,19 @@ bool ABinderProcess_isThreadPoolStarted(void);
 */
void ABinderProcess_joinThreadPool(void);

/**
 * Disables (or enables) background scheduling.
 *
 * By default, binder threads execute at a lower priority. However, this can cause
 * priority inversion, so it is recommended to be disabled in high priority
 * or in system processes.
 *
 * See also AIBinder_setMinSchedulerPolicy, which overrides this setting.
 *
 * \param disable whether to disable background scheduling
 */
void ABinderProcess_disableBackgroundScheduling(bool disable);

/**
 * This gives you an fd to wait on. Whenever data is available on the fd,
 * ABinderProcess_handlePolledCommands can be called to handle binder queries.
+1 −0
Original line number Diff line number Diff line
@@ -229,6 +229,7 @@ LIBBINDER_NDK_PLATFORM {
        AIBinder_fromPlatformBinder*;
        AIBinder_toPlatformBinder*;
        AParcel_viewPlatformParcel*;
        ABinderProcess_disableBackgroundScheduling;
    };
  local:
    *;
+4 −0
Original line number Diff line number Diff line
@@ -36,6 +36,10 @@ void ABinderProcess_joinThreadPool(void) {
    IPCThreadState::self()->joinThreadPool();
}

void ABinderProcess_disableBackgroundScheduling(bool disable) {
    IPCThreadState::disableBackgroundScheduling(disable);
}

binder_status_t ABinderProcess_setupPolling(int* fd) {
    return IPCThreadState::self()->setupPolling(fd);
}