Merge "Allow logcat to take multiple -b options, and interleave the results."
diff --git a/libcutils/iosched_policy.c b/libcutils/iosched_policy.c
index 4004a2a..7203e51 100644
--- a/libcutils/iosched_policy.c
+++ b/libcutils/iosched_policy.c
@@ -40,13 +40,16 @@
#define IOPRIO_NORM 4
int android_set_ioprio(int pid, IoSchedClass clazz, int ioprio) {
+#ifdef HAVE_ANDROID_OS
if (ioprio_set(WHO_PROCESS, pid, ioprio | (clazz << CLASS_SHIFT))) {
return -1;
}
+#endif
return 0;
}
int android_get_ioprio(int pid, IoSchedClass *clazz, int *ioprio) {
+#ifdef HAVE_ANDROID_OS
int rc;
if ((rc = ioprio_get(WHO_PROCESS, pid)) < 0) {
@@ -55,6 +58,10 @@
*clazz = (rc >> CLASS_SHIFT);
*ioprio = (rc & 0xff);
+#else
+ *clazz = IoSchedClass_NONE;
+ *ioprio = 0;
+#endif
return 0;
}
diff --git a/rootdir/init.rc b/rootdir/init.rc
index 7b7d7ba..97a3b38 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -58,7 +58,9 @@
# Create cgroup mount points for process groups
mkdir /dev/cpuctl
- mount cgroup none /dev/cpuctl cpu
+ mount cgroup none /dev/cpuctl cpu,cpuacct
+ mkdir /dev/cpuctl/uid
+ chmod 0775 /dev/cpuctl/uid
chown system system /dev/cpuctl
chown system system /dev/cpuctl/tasks
chmod 0777 /dev/cpuctl/tasks