23 #ifndef __LXC_LXCLOCK_H
24 #define __LXC_LXCLOCK_H
29 #include <semaphore.h>
33 #define LXC_LOCK_ANON_SEM 1
34 #define LXC_LOCK_FLOCK 2
Definition: lxccontainer.h:55
void container_disk_unlock(struct lxc_container *c)
Unlock the containers disk data.
union lxc_lock::@2 u
Container for lock type elements.
int fd
fd on which a lock is held (if not -1)
Definition: lxclock.h:47
sem_t * sem
Anonymous semaphore (LXC_LOCK_ANON_SEM)
Definition: lxclock.h:44
int container_disk_lock(struct lxc_container *c)
Lock the containers disk data.
struct lxc_lock * lxc_newlock(const char *lxcpath, const char *name)
Create a new (unlocked) lock.
char * fname
Name of lock.
Definition: lxclock.h:48
short type
Lock type.
Definition: lxclock.h:41
struct lxc_lock::@2::@3 f
void container_mem_unlock(struct lxc_container *c)
Unlock the containers memory.
void process_unlock(void)
Unlock the current process.
int container_mem_lock(struct lxc_container *c)
Lock the containers memory.
void process_lock(void)
Lock the current process.
int lxclock(struct lxc_lock *lock, int timeout)
Take an existing lock.
int lxcunlock(struct lxc_lock *lock)
Unlock specified lock previously locked using lxclock().
void lxc_putlock(struct lxc_lock *lock)
Free a lock created by lxc_newlock().