lockfile: expose locked()
usefull to have this macro in the interface so other modules using lockfiles can check if a certain lock is active.
This commit is contained in:
parent
2f9e968717
commit
611409c777
2 changed files with 5 additions and 5 deletions
|
|
@ -31,6 +31,8 @@ struct lockfile {
|
|||
|
||||
#define LOCKFILE_INIT { 0, -1, { 0 } }
|
||||
|
||||
#define is_locked(x) ((x)->fd >= 0)
|
||||
|
||||
int hold_lock(struct lockfile *lock, const char *filename, int force);
|
||||
|
||||
int commit_lock(struct lockfile *lock);
|
||||
|
|
|
|||
Reference in a new issue