airlock.h File Reference
Airframe lockfile interface. More...
#include <airframe/autoinc.h>
Go to the source code of this file.
Data Structures | |
struct | _AirLock |
A lock structure. More... | |
Defines | |
#define | LOCK_ERROR_DOMAIN g_quark_from_string("airframeLockError") |
GError domain for lock errors. | |
#define | LOCK_ERROR_LOCK 1 |
A lock could not be acquired. | |
#define | AIR_LOCK_INIT { NULL, 0, FALSE } |
Convenience initializer for AirLock structures. | |
Typedefs | |
typedef _AirLock | AirLock |
A lock structure. | |
Functions | |
gboolean | air_lock_acquire (AirLock *lock, const char *path, GError **err) |
Acquire a lock. | |
void | air_lock_release (AirLock *lock) |
Release an acquired lock. | |
void | air_lock_cleanup (AirLock *lock) |
Free storage used by an AirLock structure. |
Detailed Description
Airframe lockfile interface.Used to acquire lockfiles compatible with the Airframe filedaemon.
Typedef Documentation
|
A lock structure. Must be maintained by a caller from lock acquisition to release. Should be initialized by AIR_LOCK_INIT or memset(0) or bzero(). |
Function Documentation
|
Acquire a lock. Creates a lockfile and returns TRUE if the lockfile was created (and is now held).
|
|
Free storage used by an AirLock structure. Does not free the structure itself.
|
|
Release an acquired lock.
|