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
commit980edcd3304699edf9d4e4d6a656e585028e2a72 (patch)
tree139f47f3911484ae9af0eb347b1a88bd6c4bb35f /util/system/flock.h
parentb036a557f285146e5e35d4213e29a094ab907bcf (diff)
downloadydb-980edcd3304699edf9d4e4d6a656e585028e2a72.tar.gz
Restoring authorship annotation for <leo@yandex-team.ru>. Commit 1 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 797b1970a1..41eb6a1e5b 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_