cgroup.h revision b30e2f4c18ad81b04e4314fd191a5d458553773c
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
#ifndef foocgrouphfoo
#define foocgrouphfoo
/***
This file is part of systemd.
Copyright 2010 Lennart Poettering
under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
typedef struct CGroupBonding CGroupBonding;
#include "unit.h"
/* Binds a cgroup to a name */
struct CGroupBonding {
char *controller;
char *path;
/* For the Unit::cgroup_bondings list */
/* For the Manager::cgroup_bondings hashmap */
/* When shutting down, remove cgroup? Are our own tasks the
* only ones in this group?*/
bool ours:1;
/* If we cannot create this group, or add a process to it, is this fatal? */
bool essential:1;
/* This cgroup is realized */
bool realized:1;
};
int cgroup_bonding_realize(CGroupBonding *b);
int cgroup_bonding_set_task_access(CGroupBonding *b, mode_t mode, uid_t uid, gid_t gid, int sticky);
int cgroup_bonding_set_task_access_list(CGroupBonding *b, mode_t mode, uid_t uid, gid_t gid, int sticky);
int cgroup_bonding_is_empty(CGroupBonding *b);
char *cgroup_bonding_to_string(CGroupBonding *b);
#include "manager.h"
int manager_setup_cgroup(Manager *m);
#endif