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

Commit 4095348d authored by Li Li's avatar Li Li Committed by Android (Google) Code Review
Browse files

Merge "getProcessFreezeInfo reads more info from kernel" into sc-qpr1-dev

parents 81274cba 60d69037
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -1398,6 +1398,25 @@ status_t IPCThreadState::getProcessFreezeInfo(pid_t pid, bool *sync_received, bo
    return ret;
}

#ifndef __ANDROID_VNDK__
status_t IPCThreadState::getProcessFreezeInfo(pid_t pid, uint32_t *sync_received,
                                              uint32_t *async_received)
{
    int ret = 0;
    binder_frozen_status_info info;
    info.pid = pid;

#if defined(__ANDROID__)
    if (ioctl(self()->mProcess->mDriverFD, BINDER_GET_FROZEN_INFO, &info) < 0)
        ret = -errno;
#endif
    *sync_received = info.sync_recv;
    *async_received = info.async_recv;

    return ret;
}
#endif

status_t IPCThreadState::freeze(pid_t pid, bool enable, uint32_t timeout_ms) {
    struct binder_freeze_info info;
    int ret = 0;
+2 −0
Original line number Diff line number Diff line
@@ -74,6 +74,8 @@ struct binder_frozen_status_info {
    //
    // Indicates whether the process has received any sync calls since last
    // freeze (cleared at freeze/unfreeze)
    // bit 0: received sync transaction after being frozen
    // bit 1: new pending sync transaction during freezing
    //
    __u32 sync_recv;
    //
+7 −0
Original line number Diff line number Diff line
@@ -53,6 +53,13 @@ public:
    // Provide information about the state of a frozen process
    static  status_t            getProcessFreezeInfo(pid_t pid, bool *sync_received,
                                                    bool *async_received);

    // TODO: Remove the above legacy duplicated function in next version
#ifndef __ANDROID_VNDK__
    static  status_t            getProcessFreezeInfo(pid_t pid, uint32_t *sync_received,
                                                    uint32_t *async_received);
#endif

            sp<ProcessState>    process();
            
            status_t            clearLastError();
+1 −0
Original line number Diff line number Diff line
@@ -149,6 +149,7 @@ LIBBINDER {
    _ZN7android14IPCThreadState20clearCallingIdentityEv;
    _ZN7android14IPCThreadState20getAndExecuteCommandEv;
    _ZN7android14IPCThreadState20getProcessFreezeInfoEiPbS1_;
    _ZN7android14IPCThreadState20getProcessFreezeInfoEiPjS1_;
    _ZN7android14IPCThreadState20handlePolledCommandsEv;
    _ZN7android14IPCThreadState20processPendingDerefsEv;
    _ZN7android14IPCThreadState20writeTransactionDataEijijRKNS_6ParcelEPi;
+1 −0
Original line number Diff line number Diff line
@@ -150,6 +150,7 @@ LIBBINDER {
    _ZN7android14IPCThreadState20clearCallingIdentityEv;
    _ZN7android14IPCThreadState20getAndExecuteCommandEv;
    _ZN7android14IPCThreadState20getProcessFreezeInfoEiPbS1_;
    _ZN7android14IPCThreadState20getProcessFreezeInfoEiPjS1_;
    _ZN7android14IPCThreadState20handlePolledCommandsEv;
    _ZN7android14IPCThreadState20processPendingDerefsEv;
    _ZN7android14IPCThreadState20writeTransactionDataEijijRKNS_6ParcelEPi;
Loading