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

Commit c2fc0bd8 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Camera: Remove flag 'realtime_priority_bump'" into main

parents 0eed1580 6d4720a1
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -187,16 +187,6 @@ flag {
    bug: "332557570"
}

flag {
    namespace: "camera_platform"
    name: "realtime_priority_bump"
    description: "Bump the scheduling priority of performance critical code paths"
    bug: "336628522"
    metadata {
        purpose: PURPOSE_BUGFIX
    }
}

flag {
    namespace: "camera_platform"
    name: "use_system_api_for_vndk_version"
+14 −16
Original line number Diff line number Diff line
@@ -77,7 +77,6 @@ int getVNDKVersionFromProp(int defaultVersion) {

RunThreadWithRealtimePriority::RunThreadWithRealtimePriority(int tid)
    : mTid(tid), mPreviousPolicy(sched_getscheduler(tid)) {
    if (flags::realtime_priority_bump()) {
    auto res = sched_getparam(mTid, &mPreviousParams);
    if (res != OK) {
        ALOGE("Can't retrieve thread scheduler parameters: %s (%d)", strerror(-res), res);
@@ -95,10 +94,9 @@ RunThreadWithRealtimePriority::RunThreadWithRealtimePriority(int tid)
        mPolicyBumped = true;
    }
}
}

RunThreadWithRealtimePriority::~RunThreadWithRealtimePriority() {
    if (mPolicyBumped && flags::realtime_priority_bump()) {
    if (mPolicyBumped) {
        auto res = sched_setscheduler(mTid, mPreviousPolicy, &mPreviousParams);
        if (res != OK) {
            ALOGE("Can't set regular priority for thread: %s (%d)", strerror(-res), res);