]>
Commit | Line | Data |
---|---|---|
53e1b683 | 1 | /* SPDX-License-Identifier: LGPL-2.1+ */ |
cd2eb9e9 CW |
2 | #pragma once |
3 | ||
11c3a366 TA |
4 | #include <stddef.h> |
5 | ||
cd2eb9e9 CW |
6 | #include "macro.h" |
7 | #include "missing.h" | |
8 | ||
9 | typedef struct LockFile { | |
10 | char *path; | |
11 | int fd; | |
12 | int operation; | |
13 | } LockFile; | |
14 | ||
15 | int make_lock_file(const char *p, int operation, LockFile *ret); | |
16 | int make_lock_file_for(const char *p, int operation, LockFile *ret); | |
17 | void release_lock_file(LockFile *f); | |
18 | ||
cd2eb9e9 | 19 | #define LOCK_FILE_INIT { .fd = -1, .path = NULL } |