cgroup.h revision 8e27452380193a5f81bfd08a59aab8b07008ba0b
/*-*- Mode: C; c-basic-offset: 8 -*-*/
#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/>.
***/
#include <libcgroup.h>
typedef struct CGroupBonding CGroupBonding;
#include "unit.h"
/* Binds a cgroup to a name */
struct CGroupBonding {
char *controller;
char *path;
/* When shutting down, kill all tasks? */
bool kill_all:1;
/* When shutting down, remove cgroup? */
bool clean_up:1;
/* When our tasks are the only ones in this group */
bool only_us:1;
/* Inherit parameters from parent group */
bool inherit:1;
/* For the Unit::cgroup_bondings list */
/* For the Manager::cgroup_bondings hashmap */
};
int cgroup_bonding_realize(CGroupBonding *b);
void cgroup_bonding_free(CGroupBonding *b);
int cgroup_bonding_is_empty(CGroupBonding *b);
#include "manager.h"
int manager_setup_cgroup(Manager *m);
int manager_shutdown_cgroup(Manager *m);
#endif