]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/cgroup-util.h
cgroup: make cgroup controller name a constant
[thirdparty/systemd.git] / src / cgroup-util.h
CommitLineData
8c6db833
LP
1/*-*- Mode: C; c-basic-offset: 8 -*-*/
2
3#ifndef foocgrouputilhfoo
4#define foocgrouputilhfoo
5
6/***
7 This file is part of systemd.
8
9 Copyright 2010 Lennart Poettering
10
11 systemd is free software; you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 2 of the License, or
14 (at your option) any later version.
15
16 systemd is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with systemd; If not, see <http://www.gnu.org/licenses/>.
23***/
24
25#include <sys/types.h>
26
27int cg_translate_error(int error, int _errno);
28
29int cg_kill(const char *controller, const char *path, int sig, bool ignore_self);
30int cg_kill_recursive(const char *controller, const char *path, int sig, bool ignore_self);
31int cg_kill_recursive_and_wait(const char *controller, const char *path);
32
33int cg_migrate(const char *controller, const char *from, const char *to, bool ignore_self);
34int cg_migrate_recursive(const char *controller, const char *from, const char *to, bool ignore_self);
35
36int cg_get_path(const char *controller, const char *path, const char *suffix, char **fs);
37int cg_get_by_pid(const char *controller, pid_t pid, char **path);
38
39int cg_trim(const char *controller, const char *path, bool delete_root);
40int cg_delete(const char *controller, const char *path);
41
42int cg_create(const char *controller, const char *path);
43int cg_attach(const char *controller, const char *path, pid_t pid);
44int cg_create_and_attach(const char *controller, const char *path, pid_t pid);
45
46int cg_set_group_access(const char *controller, const char *path, mode_t mode, uid_t uid, gid_t gid);
47int cg_set_task_access(const char *controller, const char *path, mode_t mode, uid_t uid, gid_t gid);
48
49int cg_install_release_agent(const char *controller, const char *agent);
50
51int cg_is_empty(const char *controller, const char *path, bool ignore_self);
52int cg_is_empty_recursive(const char *controller, const char *path, bool ignore_self);
53
54#endif