Archived
1
0
Fork 0

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:
Henrik Hautakoski 2011-09-24 13:03:22 +02:00
parent 2f9e968717
commit 611409c777
2 changed files with 5 additions and 5 deletions

View file

@ -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);