diff options
Diffstat (limited to 'libprocessgroup/sched_policy.cpp')
-rw-r--r-- | libprocessgroup/sched_policy.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libprocessgroup/sched_policy.cpp b/libprocessgroup/sched_policy.cpp index 1eefadab9..c7d0cca4c 100644 --- a/libprocessgroup/sched_policy.cpp +++ b/libprocessgroup/sched_policy.cpp @@ -152,21 +152,21 @@ int set_sched_policy(int tid, SchedPolicy policy) { } bool cpusets_enabled() { - static bool enabled = (CgroupMap::GetInstance().FindController("cpuset") != nullptr); + static bool enabled = (CgroupMap::GetInstance().FindController("cpuset").HasValue()); return enabled; } bool schedboost_enabled() { - static bool enabled = (CgroupMap::GetInstance().FindController("schedtune") != nullptr); + static bool enabled = (CgroupMap::GetInstance().FindController("schedtune").HasValue()); return enabled; } static int getCGroupSubsys(int tid, const char* subsys, std::string& subgroup) { - const CgroupController* controller = CgroupMap::GetInstance().FindController(subsys); + auto controller = CgroupMap::GetInstance().FindController(subsys); - if (!controller) return -1; + if (!controller.HasValue()) return -1; - if (!controller->GetTaskGroup(tid, &subgroup)) { + if (!controller.GetTaskGroup(tid, &subgroup)) { LOG(ERROR) << "Failed to find cgroup for tid " << tid; return -1; } |