]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/basic/lockfile-util.h
cgroup-util: add mask definitions for sets of controllers supported by cgroupsv1...
[thirdparty/systemd.git] / src / basic / lockfile-util.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2 #pragma once
3
4 #include <stddef.h>
5
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
19 #define LOCK_FILE_INIT { .fd = -1, .path = NULL }