From 96fc434b6cb5cc08c045d1610e19398bb29f8657 Mon Sep 17 00:00:00 2001 From: "T.J. Mercier" Date: Sat, 26 Oct 2024 00:34:51 +0000 Subject: [PATCH] libprocessgroup: Remove ifdefery around SetTimerSlackAction::ExecuteForTask This appears to have been due to the use of prctl, which apparently caused issues for mac builds. Now that use of prctl has been removed, it doesn't look like we need this anymore. Fixes: 075008174 ("libprocessgroup: Remove prctl interface for setting timer slack") Test: m Bug: 372498744 Change-Id: I8a43951f30d7dd838591a8ba225d712742d7cd4a --- libprocessgroup/task_profiles.cpp | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/libprocessgroup/task_profiles.cpp b/libprocessgroup/task_profiles.cpp index cc675b3fe..c96feb314 100644 --- a/libprocessgroup/task_profiles.cpp +++ b/libprocessgroup/task_profiles.cpp @@ -188,9 +188,6 @@ bool ProfileAttribute::GetPathForUID(uid_t uid, std::string* path) const { return true; } -// To avoid issues in sdk_mac build -#if defined(__ANDROID__) - bool SetTimerSlackAction::ExecuteForTask(pid_t tid) const { const auto file = StringPrintf("/proc/%d/timerslack_ns", tid); if (!WriteStringToFile(std::to_string(slack_), file)) { @@ -205,14 +202,6 @@ bool SetTimerSlackAction::ExecuteForTask(pid_t tid) const { return true; } -#else - -bool SetTimerSlackAction::ExecuteForTask(int) const { - return true; -}; - -#endif - bool SetAttributeAction::WriteValueToFile(const std::string& path) const { if (!WriteStringToFile(value_, path)) { if (access(path.c_str(), F_OK) < 0) {