aboutsummaryrefslogtreecommitdiffstats
path: root/util/system/flock.h
diff options
context:
space:
mode:
authorleo <leo@yandex-team.ru>2022-02-10 16:46:40 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:40 +0300
commit99609724f661f7e21d1cb08e8d80e87c3632fdb3 (patch)
tree49e222ea1c5804306084bb3ae065bb702625360f /util/system/flock.h
parent980edcd3304699edf9d4e4d6a656e585028e2a72 (diff)
downloadydb-99609724f661f7e21d1cb08e8d80e87c3632fdb3.tar.gz
Restoring authorship annotation for <leo@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/system/flock.h')
-rw-r--r--util/system/flock.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/util/system/flock.h b/util/system/flock.h
index 41eb6a1e5b..797b1970a1 100644
--- a/util/system/flock.h
+++ b/util/system/flock.h
@@ -1,14 +1,14 @@
#pragma once
-
+
#include "error.h"
-#include "defaults.h"
+#include "defaults.h"
#include "file.h"
-
-#if defined(_unix_)
-
+
+#if defined(_unix_)
+
#include <sys/file.h>
#include <fcntl.h>
-
+
static inline int Flock(int fd, int op) {
return flock(fd, op);
}
@@ -16,20 +16,20 @@ static inline int Flock(int fd, int op) {
#else // not _unix_
#ifdef __cplusplus
-extern "C" {
+extern "C" {
#endif
-
+
#define LOCK_SH 1 /* shared lock */
#define LOCK_EX 2 /* exclusive lock */
#define LOCK_NB 4 /* don't block when locking */
#define LOCK_UN 8 /* unlock */
-
+
int Flock(void* hndl, int operation);
int flock(int fd, int operation);
int fsync(int fd);
-
+
#ifdef __cplusplus
-}
+}
#endif
-
+
#endif // not _unix_