lxc_cgroup.h 1.5 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
/*
 * Copyright (C) 2010-2012 Red Hat, Inc.
 * Copyright IBM Corp. 2008
 *
 * lxc_cgroup.c: LXC cgroup helpers
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library 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
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
18
 * License along with this library.  If not, see
O
Osier Yang 已提交
19
 * <http://www.gnu.org/licenses/>.
20 21 22 23 24
 */

#ifndef __VIR_LXC_CGROUP_H__
# define __VIR_LXC_CGROUP_H__

25
# include "vircgroup.h"
26
# include "domain_conf.h"
27
# include "lxc_fuse.h"
28
# include "virusb.h"
29

30
virCgroupPtr virLXCCgroupCreate(virDomainDefPtr def);
31
virCgroupPtr virLXCCgroupJoin(virDomainDefPtr def);
32
int virLXCCgroupSetup(virDomainDefPtr def,
33 34 35
                      virCgroupPtr cgroup,
                      virBitmapPtr nodemask);

36
int virLXCCgroupGetMeminfo(virLXCMeminfoPtr meminfo);
37 38

int
39
virLXCSetupHostUsbDeviceCgroup(virUSBDevicePtr dev,
40 41 42 43
                               const char *path,
                               void *opaque);

int
44
virLXCTeardownHostUsbDeviceCgroup(virUSBDevicePtr dev,
45 46 47
                                  const char *path,
                                  void *opaque);

48
#endif /* __VIR_LXC_CGROUP_H__ */