diff options
| author | Dima Zavin <dima@android.com> | 2012-06-05 00:33:33 -0700 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2012-06-05 00:33:33 -0700 |
| commit | 2b628a3c2ee7d8411b76d37c3db30a0b7da24d73 (patch) | |
| tree | 777004845ecc2597d87b71f8f91c87be13516b5a | |
| parent | 38160c06cabe35330f49eb0f6e0cfcc3f9823f0d (diff) | |
| parent | 29319a6753569fb3ef160c2de2f1c4d9d1398178 (diff) | |
| download | system_core-2b628a3c2ee7d8411b76d37c3db30a0b7da24d73.tar.gz system_core-2b628a3c2ee7d8411b76d37c3db30a0b7da24d73.tar.bz2 system_core-2b628a3c2ee7d8411b76d37c3db30a0b7da24d73.zip | |
am 29319a67: cutils: sched_policy: remove audio app/sys groups, merge into fg
* commit '29319a6753569fb3ef160c2de2f1c4d9d1398178':
cutils: sched_policy: remove audio app/sys groups, merge into fg
| -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 2dce9851..d20d217b 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; |
