#include <fs.h>
Public Types | |
| typedef pid_t | pid_type |
Public Member Functions | |
| simple_lock () | |
| C'tor. | |
| simple_lock (const std::string &a_lockfile) | |
| C'tor. | |
| ~simple_lock () | |
| D'tor. | |
| void | clear (void) |
| Clear the simple_lock object. | |
| void | lockfile (const std::string &a_lockfile) |
| Set the lockfile path. | |
| const std::string | lockfile (void) const |
| Get the lockfile path. | |
| const pid_type | locked_by (void) const |
| Get the PID of the locking process. | |
| const bool | is_locked (void) const |
| Find out whether or not the lock is in place. | |
| bool | lock (void) |
| Lock. | |
| void | unlock (void) |
| Unlock. | |
Private Attributes | |
| std::string | m_lockfile |
Definition at line 341 of file fs.h.
|
|
|
|
|
C'tor.
Definition at line 1673 of file fs.cc. References clear(). Here is the call graph for this function: ![]() |
|
|
C'tor.
Definition at line 1679 of file fs.cc. References clear(), and lockfile(). Here is the call graph for this function: ![]() |
|
|
D'tor.
Definition at line 1686 of file fs.cc. References clear(). Here is the call graph for this function: ![]() |
|
|
Clear the simple_lock object.
Definition at line 1692 of file fs.cc. References is_locked(), locked_by(), m_lockfile, and unlock(). Referenced by vault_manager::clear(), lock(), lockfile(), vault_manager::select(), simple_lock(), and ~simple_lock(). Here is the call graph for this function: ![]() |
|
|
Find out whether or not the lock is in place.
Definition at line 1733 of file fs.cc. References locked_by(), and pid(). Referenced by clear(), lock(), vault_manager::select(), and test_simple_lock(). Here is the call graph for this function: ![]() |
|
|
Lock.
Definition at line 1746 of file fs.cc. References clear(), is_locked(), m_lockfile, and pid(). Referenced by vault_manager::select(), and test_simple_lock(). Here is the call graph for this function: ![]() |
|
|
Get the PID of the locking process.
Definition at line 1714 of file fs.cc. References exists(), m_lockfile, and pid(). Referenced by clear(), is_locked(), vault_manager::select(), and test_simple_lock(). Here is the call graph for this function: ![]() |
|
|
Get the lockfile path.
Definition at line 1708 of file fs.cc. References m_lockfile. Referenced by simple_lock(). |
|
|
Set the lockfile path.
Definition at line 1701 of file fs.cc. References clear(), and m_lockfile. Referenced by vault_manager::select(), and test_simple_lock(). Here is the call graph for this function: ![]() |
|
|
Unlock.
Definition at line 1766 of file fs.cc. References exists(), m_lockfile, rm_file(), TRY, and TRY_nomem. Referenced by clear(), and test_simple_lock(). Here is the call graph for this function: ![]() |
|
|
Definition at line 359 of file fs.h. Referenced by clear(), lock(), locked_by(), lockfile(), and unlock(). |
1.4.2