#include <sbuild-lock.h>
Inheritance diagram for sbuild::FileLock:
Public Member Functions | |
FileLock (int fd) | |
The constructor. | |
virtual | ~FileLock () |
The destructor. | |
void | set_lock (Type lock_type, unsigned int timeout) |
void | unset_lock () |
Release a lock. | |
Private Attributes | |
int | fd |
The file descriptor to lock. |
Simple whole-file shared and exclusive advisory locking based upon POSIX fcntl byte region locks.
|
The constructor.
|
|
Release a lock. This is equivalent to set_lock with a lock_type of LOCK_NONE and a timeout of 0. Implements sbuild::Lock. |