aboutsummaryrefslogtreecommitdiffstats
path: root/util/system
diff options
context:
space:
mode:
authororivej <orivej@yandex-team.ru>2022-02-10 16:44:49 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:44:49 +0300
commit718c552901d703c502ccbefdfc3c9028d608b947 (patch)
tree46534a98bbefcd7b1f3faa5b52c138ab27db75b7 /util/system
parente9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (diff)
downloadydb-718c552901d703c502ccbefdfc3c9028d608b947.tar.gz
Restoring authorship annotation for <orivej@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/system')
-rw-r--r--util/system/file.cpp2
-rw-r--r--util/system/mlock.cpp6
-rw-r--r--util/system/mlock.h6
-rw-r--r--util/system/user.cpp12
4 files changed, 13 insertions, 13 deletions
diff --git a/util/system/file.cpp b/util/system/file.cpp
index 4a261d020c..54bf27525f 100644
--- a/util/system/file.cpp
+++ b/util/system/file.cpp
@@ -512,7 +512,7 @@ i32 TFileHandle::Pread(void* buffer, ui32 byteCount, i64 offset) const noexcept
return bytesRead;
}
if (::GetLastError() == ERROR_HANDLE_EOF) {
- return 0;
+ return 0;
}
return -1;
#elif defined(_unix_)
diff --git a/util/system/mlock.cpp b/util/system/mlock.cpp
index 435338c98f..c70f8f3351 100644
--- a/util/system/mlock.cpp
+++ b/util/system/mlock.cpp
@@ -66,9 +66,9 @@ void LockAllMemory(ELockAllMemoryFlags flags) {
if (flags & LockFutureMemory) {
sys_flags |= MCL_FUTURE;
}
- if (flags & LockMemoryOnFault) {
- sys_flags |= MCL_ONFAULT;
- }
+ if (flags & LockMemoryOnFault) {
+ sys_flags |= MCL_ONFAULT;
+ }
if (mlockall(sys_flags)) {
ythrow yexception() << LastSystemErrorText();
}
diff --git a/util/system/mlock.h b/util/system/mlock.h
index f021c0fe67..69c933776e 100644
--- a/util/system/mlock.h
+++ b/util/system/mlock.h
@@ -19,9 +19,9 @@ enum ELockAllMemoryFlag {
/** Lock all pages which will become mapped into the address space of the process in the future. */
LockFutureMemory = 2,
-
- /** Since Linux 4.4, with LockCurrentMemory or LockFutureMemory or both, lock only pages that are or once they are present in memory. */
- LockMemoryOnFault = 4,
+
+ /** Since Linux 4.4, with LockCurrentMemory or LockFutureMemory or both, lock only pages that are or once they are present in memory. */
+ LockMemoryOnFault = 4,
};
Y_DECLARE_FLAGS(ELockAllMemoryFlags, ELockAllMemoryFlag)
Y_DECLARE_OPERATORS_FOR_FLAGS(ELockAllMemoryFlags)
diff --git a/util/system/user.cpp b/util/system/user.cpp
index 83e89ea0a8..e730f621cd 100644
--- a/util/system/user.cpp
+++ b/util/system/user.cpp
@@ -1,7 +1,7 @@
#include "user.h"
#include "platform.h"
#include "defaults.h"
-#include "env.h"
+#include "env.h"
#include <util/generic/yexception.h>
@@ -14,13 +14,13 @@
#endif
TString GetUsername() {
- for (const auto& var : {"LOGNAME", "USER", "LNAME", "USERNAME"}) {
- TString val = GetEnv(var);
+ for (const auto& var : {"LOGNAME", "USER", "LNAME", "USERNAME"}) {
+ TString val = GetEnv(var);
if (val) {
- return val;
+ return val;
}
- }
-
+ }
+
TTempBuf nameBuf;
for (;;) {
#if defined(_win_)