LXC
Main Page
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
src
lxc
lxclock.h
Go to the documentation of this file.
1
23
#ifndef __LXC_LXCLOCK_H
24
#define __LXC_LXCLOCK_H
25
26
#include <fcntl.h>
/* For O_* constants */
27
#include <sys/stat.h>
/* For mode constants */
28
#include <sys/file.h>
29
#include <semaphore.h>
30
#include <string.h>
31
#include <time.h>
32
33
#define LXC_LOCK_ANON_SEM 1
34
#define LXC_LOCK_FLOCK 2
36
// private
37
40
struct
lxc_lock
{
41
short
type
;
42
43
union
{
44
sem_t *
sem
;
45
46
struct
{
47
int
fd
;
48
char
*
fname
;
49
}
f
;
50
}
u
;
51
};
52
80
extern
struct
lxc_lock
*
lxc_newlock
(
const
char
*lxcpath,
const
char
*name);
81
97
extern
int
lxclock
(
struct
lxc_lock
*lock,
int
timeout);
98
107
extern
int
lxcunlock
(
struct
lxc_lock
*lock);
108
114
extern
void
lxc_putlock
(
struct
lxc_lock
*lock);
115
119
extern
void
process_lock
(
void
);
120
124
extern
void
process_unlock
(
void
);
125
126
struct
lxc_container
;
127
135
extern
int
container_mem_lock
(
struct
lxc_container
*c);
136
142
extern
void
container_mem_unlock
(
struct
lxc_container
*c);
143
152
extern
int
container_disk_lock
(
struct
lxc_container
*c);
153
157
extern
void
container_disk_unlock
(
struct
lxc_container
*c);
158
159
#endif
Generated on Tue Nov 24 2015 22:04:40 for LXC by
1.8.1.2