Lines Matching refs:cgroup
2288 static int uv__get_cgroupv2_constrained_cpu(const char* cgroup, in uv__get_cgroupv2_constrained_cpu() argument
2297 if (strncmp(cgroup, "0::/", 4) != 0) in uv__get_cgroupv2_constrained_cpu()
2301 cgroup_trimmed = cgroup + sizeof("0::/") - 1; /* Skip the prefix "0::/" */ in uv__get_cgroupv2_constrained_cpu()
2336 static char* uv__cgroup1_find_cpu_controller(const char* cgroup, in uv__cgroup1_find_cpu_controller() argument
2339 char* cgroup_cpu = strstr(cgroup, ":cpu,"); in uv__cgroup1_find_cpu_controller()
2351 static int uv__get_cgroupv1_constrained_cpu(const char* cgroup, in uv__get_cgroupv1_constrained_cpu() argument
2359 cgroup_cpu = uv__cgroup1_find_cpu_controller(cgroup, &cgroup_size); in uv__get_cgroupv1_constrained_cpu()
2402 char cgroup[1024]; in uv__get_constrained_cpu() local
2405 if (uv__slurp("/proc/self/cgroup", cgroup, sizeof(cgroup)) < 0) in uv__get_constrained_cpu()
2411 if (strncmp(cgroup, "0::/", 4) == 0) in uv__get_constrained_cpu()
2412 return uv__get_cgroupv2_constrained_cpu(cgroup, constraint); in uv__get_constrained_cpu()
2414 return uv__get_cgroupv1_constrained_cpu(cgroup, constraint); in uv__get_constrained_cpu()