]> git.proxmox.com Git - mirror_lxc.git/blame - src/lxc/sync.h
lxccontainer: properly cleanup on mount injection failure
[mirror_lxc.git] / src / lxc / sync.h
CommitLineData
3c22086f
CLG
1/*
2 * lxc: linux Container library
3 *
4 * (C) Copyright IBM Corp. 2007, 2008
5 *
6 * Authors:
9afe19d6 7 * Daniel Lezcano <daniel.lezcano at free.fr>
3c22086f
CLG
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
13 *
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
250b1eec 21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
3c22086f 22 */
f1a4a029
ÇO
23#ifndef __LXC_SYNC_H
24#define __LXC_SYNC_H
3c22086f
CLG
25
26struct lxc_handler;
27
28enum {
5b1e83cb 29 LXC_SYNC_STARTUP,
3c22086f
CLG
30 LXC_SYNC_CONFIGURE,
31 LXC_SYNC_POST_CONFIGURE,
544a48a0 32 LXC_SYNC_CGROUP,
f4152036
CB
33 LXC_SYNC_CGROUP_UNSHARE,
34 LXC_SYNC_CGROUP_LIMITS,
08dd2805 35 LXC_SYNC_READY_START,
3c22086f
CLG
36 LXC_SYNC_RESTART,
37 LXC_SYNC_POST_RESTART,
ea720ff1 38 LXC_SYNC_ERROR = -1 /* Used to report errors from another process */
3c22086f
CLG
39};
40
41int lxc_sync_init(struct lxc_handler *handler);
42void lxc_sync_fini(struct lxc_handler *);
43void lxc_sync_fini_parent(struct lxc_handler *);
44void lxc_sync_fini_child(struct lxc_handler *);
45int lxc_sync_wake_child(struct lxc_handler *, int);
46int lxc_sync_wait_child(struct lxc_handler *, int);
47int lxc_sync_wake_parent(struct lxc_handler *, int);
5b1e83cb 48int lxc_sync_wait_parent(struct lxc_handler *, int);
3c22086f
CLG
49int lxc_sync_barrier_parent(struct lxc_handler *, int);
50int lxc_sync_barrier_child(struct lxc_handler *, int);
51
52#endif