Lines Matching refs:tid
68 static int add_tid_to_cgroup(int tid, SchedPolicy policy) in add_tid_to_cgroup() argument
101 while (tid > 0) { in add_tid_to_cgroup()
102 *--ptr = '0' + (tid % 10); in add_tid_to_cgroup()
103 tid = tid / 10; in add_tid_to_cgroup()
161 static int getSchedulerGroup(int tid, char* buf, size_t bufLen) in getSchedulerGroup() argument
168 snprintf(pathBuf, sizeof(pathBuf), "/proc/%d/cgroup", tid); in getSchedulerGroup()
222 int get_sched_policy(int tid, SchedPolicy *policy) in get_sched_policy() argument
225 if (tid == 0) { in get_sched_policy()
226 tid = gettid(); in get_sched_policy()
233 if (getSchedulerGroup(tid, grpBuf, sizeof(grpBuf)) < 0) in get_sched_policy()
246 int rc = sched_getscheduler(tid); in get_sched_policy()
261 int set_sched_policy(int tid, SchedPolicy policy) in set_sched_policy() argument
264 if (tid == 0) { in set_sched_policy()
265 tid = gettid(); in set_sched_policy()
277 sprintf(statfile, "/proc/%d/stat", tid); in set_sched_policy()
296 SLOGD("vvv tid %d (%s)", tid, thread_name); in set_sched_policy()
301 SLOGD("^^^ tid %d (%s)", tid, thread_name); in set_sched_policy()
304 SLOGD("/// tid %d (%s)", tid, thread_name); in set_sched_policy()
307 SLOGD("??? tid %d (%s)", tid, thread_name); in set_sched_policy()
313 if (add_tid_to_cgroup(tid, policy)) { in set_sched_policy()
321 sched_setscheduler(tid, in set_sched_policy()
334 int set_sched_policy(int tid, SchedPolicy policy) in set_sched_policy() argument
339 int get_sched_policy(int tid, SchedPolicy *policy) in get_sched_policy() argument