Archived
1
0
Fork 0
This repository has been archived on 2026-05-10. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
dlight/lockfile.h
Henrik Hautakoski 5a5a3d33e4 Adding lockfile.c
moving code from compile.c under an api so it can be reused.
2011-09-21 17:19:09 +02:00

18 lines
No EOL
304 B
C

#ifndef LOCKFILE_H
#define LOCKFILE_H
struct lockfile {
int fd;
char name[4096];
};
#define LOCKFILE_INIT { -1, { 0 } }
int hold_lock(struct lockfile *lock, const char *filename, int force);
int commit_lock(struct lockfile *lock);
int release_lock(struct lockfile *lock);
#endif /* LOCKFILE_H */