diff options
author | Anton Samokhvalov <pg83@yandex.ru> | 2022-02-10 16:45:15 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:15 +0300 |
commit | 72cb13b4aff9bc9cf22e49251bc8fd143f82538f (patch) | |
tree | da2c34829458c7d4e74bdfbdf85dff449e9e7fb8 /util/system/flock.h | |
parent | 778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5 (diff) | |
download | ydb-72cb13b4aff9bc9cf22e49251bc8fd143f82538f.tar.gz |
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 1 of 2.
Diffstat (limited to 'util/system/flock.h')
-rw-r--r-- | util/system/flock.h | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/util/system/flock.h b/util/system/flock.h index 797b1970a1..991f892ae5 100644 --- a/util/system/flock.h +++ b/util/system/flock.h @@ -1,35 +1,35 @@ #pragma once -#include "error.h" +#include "error.h" #include "defaults.h" #include "file.h" #if defined(_unix_) - #include <sys/file.h> - #include <fcntl.h> - -static inline int Flock(int fd, int op) { - return flock(fd, op); -} + #include <sys/file.h> + #include <fcntl.h> +static inline int Flock(int fd, int op) { + return flock(fd, op); +} + #else // not _unix_ - #ifdef __cplusplus + #ifdef __cplusplus extern "C" { - #endif + #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 */ + #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); + int Flock(void* hndl, int operation); + int flock(int fd, int operation); + int fsync(int fd); - #ifdef __cplusplus + #ifdef __cplusplus } - #endif + #endif #endif // not _unix_ |