1 #ifndef ANDROID_DVR_PERFORMANCE_CLIENT_H_ 2 #define ANDROID_DVR_PERFORMANCE_CLIENT_H_ 3 4 #include <sys/types.h> 5 6 #include <cstddef> 7 #include <string> 8 #include <tuple> 9 10 #include <pdx/client.h> 11 12 namespace android { 13 namespace dvr { 14 15 class PerformanceClient : public pdx::ClientBase<PerformanceClient> { 16 public: 17 int SetSchedulerPolicy(pid_t task_id, const std::string& scheduler_policy); 18 int SetSchedulerPolicy(pid_t task_id, const char* scheduler_policy); 19 20 // TODO(eieio): Consider deprecating this API. 21 int SetCpuPartition(pid_t task_id, const std::string& partition); 22 int SetCpuPartition(pid_t task_id, const char* partition); 23 int SetSchedulerClass(pid_t task_id, const std::string& scheduler_class); 24 int SetSchedulerClass(pid_t task_id, const char* scheduler_class); 25 int GetCpuPartition(pid_t task_id, std::string* partition_out); 26 int GetCpuPartition(pid_t task_id, char* partition_out, std::size_t size); 27 28 private: 29 friend BASE; 30 31 explicit PerformanceClient(int* error); 32 33 PerformanceClient(const PerformanceClient&) = delete; 34 void operator=(const PerformanceClient&) = delete; 35 }; 36 37 } // namespace dvr 38 } // namespace android 39 40 #endif // ANDROID_DVR_PERFORMANCE_CLIENT_H_ 41