Make class SetTimerSlackAction easier to maintain
Unify the Darwin and Linux class declarations. Move all #ifdefs for this class into the .cpp file. This patch does not change any functionality. Bug: 213617178 Test: Booted Android in Cuttlefish. Change-Id: I6a3cedc75c2dbf8aa062edda76cae9959767a763 Signed-off-by: Bart Van Assche <bvanassche@google.com>
This commit is contained in:
parent
075b6d725e
commit
20d59bd21b
2 changed files with 6 additions and 14 deletions
|
|
@ -183,6 +183,12 @@ bool SetTimerSlackAction::ExecuteForTask(int tid) const {
|
|||
return true;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
bool SetTimerSlackAction::ExecuteForTask(int) const {
|
||||
return true;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
bool SetAttributeAction::ExecuteForProcess(uid_t, pid_t pid) const {
|
||||
|
|
|
|||
|
|
@ -73,9 +73,6 @@ class SetClampsAction : public ProfileAction {
|
|||
int clamp_;
|
||||
};
|
||||
|
||||
// To avoid issues in sdk_mac build
|
||||
#if defined(__ANDROID__)
|
||||
|
||||
class SetTimerSlackAction : public ProfileAction {
|
||||
public:
|
||||
SetTimerSlackAction(unsigned long slack) noexcept : slack_(slack) {}
|
||||
|
|
@ -88,17 +85,6 @@ class SetTimerSlackAction : public ProfileAction {
|
|||
static bool IsTimerSlackSupported(int tid);
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
class SetTimerSlackAction : public ProfileAction {
|
||||
public:
|
||||
SetTimerSlackAction(unsigned long) noexcept {}
|
||||
|
||||
virtual bool ExecuteForTask(int) const { return true; }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
// Set attribute profile element
|
||||
class SetAttributeAction : public ProfileAction {
|
||||
public:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue