diff options
author | Dima Zavin <dima@android.com> | 2012-06-04 13:14:36 -0700 |
---|---|---|
committer | Dima Zavin <dima@android.com> | 2012-06-04 13:20:17 -0700 |
commit | 29319a6753569fb3ef160c2de2f1c4d9d1398178 (patch) | |
tree | 802bd3b1f8d848acc721ec0ffb88cc0e26cb8167 /libcutils/sched_policy.c | |
parent | df44b88621f60e933d7d31090bf0bb892e88142c (diff) | |
download | system_core-29319a6753569fb3ef160c2de2f1c4d9d1398178.zip system_core-29319a6753569fb3ef160c2de2f1c4d9d1398178.tar.gz system_core-29319a6753569fb3ef160c2de2f1c4d9d1398178.tar.bz2 |
cutils: sched_policy: remove audio app/sys groups, merge into fg
Bug: 6528015
Change-Id: I6c2658b62442d811b53c6d18476fbd6cd45f9e3f
Signed-off-by: Dima Zavin <dima@android.com>
Diffstat (limited to 'libcutils/sched_policy.c')
-rw-r--r-- | libcutils/sched_policy.c | 35 |
1 files changed, 4 insertions, 31 deletions
diff --git a/libcutils/sched_policy.c b/libcutils/sched_policy.c index 2dce985..d20d217 100644 --- a/libcutils/sched_policy.c +++ b/libcutils/sched_policy.c @@ -63,8 +63,6 @@ static int fg_cgroup_fd = -1; #if CAN_SET_SP_SYSTEM static int system_cgroup_fd = -1; #endif -static int audio_app_cgroup_fd = -1; -static int audio_sys_cgroup_fd = -1; /* Add tid to the scheduling group defined by the policy */ static int add_tid_to_cgroup(int tid, SchedPolicy policy) @@ -76,6 +74,8 @@ static int add_tid_to_cgroup(int tid, SchedPolicy policy) fd = bg_cgroup_fd; break; case SP_FOREGROUND: + case SP_AUDIO_APP: + case SP_AUDIO_SYS: fd = fg_cgroup_fd; break; #if CAN_SET_SP_SYSTEM @@ -83,12 +83,6 @@ static int add_tid_to_cgroup(int tid, SchedPolicy policy) fd = system_cgroup_fd; break; #endif - case SP_AUDIO_APP: - fd = audio_app_cgroup_fd; - break; - case SP_AUDIO_SYS: - fd = audio_sys_cgroup_fd; - break; default: fd = -1; break; @@ -148,19 +142,6 @@ static void __initialize(void) { if (bg_cgroup_fd < 0) { SLOGE("open of %s failed: %s\n", filename, strerror(errno)); } - - filename = "/dev/cpuctl/audio_app/tasks"; - audio_app_cgroup_fd = open(filename, O_WRONLY | O_CLOEXEC); - if (audio_app_cgroup_fd < 0) { - SLOGV("open of %s failed: %s\n", filename, strerror(errno)); - } - - filename = "/dev/cpuctl/audio_sys/tasks"; - audio_sys_cgroup_fd = open(filename, O_WRONLY | O_CLOEXEC); - if (audio_sys_cgroup_fd < 0) { - SLOGV("open of %s failed: %s\n", filename, strerror(errno)); - } - } else { __sys_supports_schedgroups = 0; } @@ -257,10 +238,6 @@ int get_sched_policy(int tid, SchedPolicy *policy) *policy = SP_BACKGROUND; } else if (!strcmp(grpBuf, "apps")) { *policy = SP_FOREGROUND; - } else if (!strcmp(grpBuf, "audio_app")) { - *policy = SP_AUDIO_APP; - } else if (!strcmp(grpBuf, "audio_sys")) { - *policy = SP_AUDIO_SYS; } else { errno = ERANGE; return -1; @@ -319,17 +296,13 @@ int set_sched_policy(int tid, SchedPolicy policy) SLOGD("vvv tid %d (%s)", tid, thread_name); break; case SP_FOREGROUND: + case SP_AUDIO_APP: + case SP_AUDIO_SYS: SLOGD("^^^ tid %d (%s)", tid, thread_name); break; case SP_SYSTEM: SLOGD("/// tid %d (%s)", tid, thread_name); break; - case SP_AUDIO_APP: - SLOGD("aaa tid %d (%s)", tid, thread_name); - break; - case SP_AUDIO_SYS: - SLOGD("sss tid %d (%s)", tid, thread_name); - break; default: SLOGD("??? tid %d (%s)", tid, thread_name); break; |