Lines Matching defs:path
38 #define format_cgroup_path_pid(buf, path, pid) \
40 CGROUP_WORK_DIR, pid, path)
42 #define format_cgroup_path(buf, path) \
43 format_cgroup_path_pid(buf, path, getpid())
45 #define format_parent_cgroup_path(buf, path) \
46 format_cgroup_path_pid(buf, path, getppid())
54 char path[PATH_MAX + 1];
62 snprintf(path, sizeof(path), "%s/cgroup.controllers",
64 fd = open(path, O_RDONLY);
66 log_err("Opening cgroup.controllers: %s", path);
72 log_err("Reading cgroup.controllers: %s", path);
84 snprintf(path, sizeof(path), "%s/cgroup.subtree_control", cgroup_path);
85 cfd = open(path, O_RDWR);
87 log_err("Opening cgroup.subtree_control: %s", path);
93 log_err("Enabling controller %s: %s", c, path);
104 * @relative_path: The cgroup path, relative to the workdir
145 * @relative_path: The cgroup path, relative to the workdir
165 * @relative_path: The cgroup path, relative to the parent process workdir
263 * @relative_path: The cgroup path, relative to the workdir, to join
266 * work dir, and it joins it. For example, passing "/my-cgroup" as the path
294 * @relative_path: The cgroup path, relative to parent process workdir, to join
350 * @relative_path: The cgroup path, relative to the workdir, to remove
369 * @relative_path: The cgroup path, relative to the workdir, to join
398 * get_cgroup_id() - Get cgroup id for a particular cgroup path
399 * @relative_path: The cgroup path, relative to the workdir, to join
453 int cgroup_setup_and_join(const char *path) {
461 cg_fd = create_and_get_cgroup(path);
468 if (join_cgroup(path)) {