#include <sbuild-lock.h>
Inheritance diagram for sbuild::device_lock:


Public Member Functions | |
| device_lock (std::string const &device) | |
| The constructor. | |
| virtual | ~device_lock () |
| The destructor. | |
| void | set_lock (type lock_type, unsigned int timeout) |
| void | unset_lock () |
| Release a lock. | |
Private Attributes | |
| std::string | device |
| The device to lock. | |
Set an advisory lock on a device. The lock is acquired using liblockdev lock_dev(). Note that a lock_type of LOCK_SHARED is equivalent to LOCK_EXCLUSIVE, because this lock type does not support shared locks.
|
|
The constructor.
|
|
|
The destructor.
|
|
||||||||||||
|
|
|
|
Release a lock. This is equivalent to set_lock with a lock_type of LOCK_NONE and a timeout of 0. Implements sbuild::lock. |
|
|
The device to lock.
|
1.4.6