Lines Matching refs:thr
39 static int map_fill_strand(sched_policy* sp, int thr);
40 static int map_fill_core(sched_policy* sp, int thr);
41 static int map_fill_chip(sched_policy* sp, int thr);
73 int sched_thr_to_cpu(sched_policy* sp, int thr)
75 return sp->map(sp, thr);
78 static int map_fill_strand(sched_policy* sp, int thr)
81 return (thr % num_cpus);
84 static int map_fill_core(sched_policy* sp, int thr)
91 thr %= num_cpus;
92 core = thr % (NUM_CORES_PER_CHIP * sp->num_chips_per_sys);
93 strand = (thr / (NUM_CORES_PER_CHIP * sp->num_chips_per_sys));
97 return thr % num_cpus;
101 static int map_fill_chip(sched_policy* sp, int thr)
108 thr %= num_cpus;
110 chip = thr % sp->num_chips_per_sys;
111 core = (thr / sp->num_chips_per_sys) % NUM_CORES_PER_CHIP;
112 strand = thr / (NUM_CORES_PER_CHIP * NUM_STRANDS_PER_CORE);
119 return thr % num_cpus;