aboutsummaryrefslogtreecommitdiffstats
path: root/util/system
diff options
context:
space:
mode:
authorAlexander Gololobov <davenger@yandex-team.com>2022-02-10 16:47:37 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:37 +0300
commit39608cdb86363c75ce55b2b9a69841c3b71f22cf (patch)
tree4ec132c1665bd4d68e3628aa18d937c70d32413b /util/system
parent54295b9bd4dc45c54d804084fd846d945148a7f0 (diff)
downloadydb-39608cdb86363c75ce55b2b9a69841c3b71f22cf.tar.gz
Restoring authorship annotation for Alexander Gololobov <davenger@yandex-team.com>. Commit 1 of 2.
Diffstat (limited to 'util/system')
-rw-r--r--util/system/align.h6
-rw-r--r--util/system/align_ut.cpp14
-rw-r--r--util/system/context.h2
-rw-r--r--util/system/dynlib.cpp4
-rw-r--r--util/system/dynlib.h12
-rw-r--r--util/system/sanitizers.h4
-rw-r--r--util/system/thread.cpp2
-rw-r--r--util/system/thread.h2
8 files changed, 23 insertions, 23 deletions
diff --git a/util/system/align.h b/util/system/align.h
index ea0bbc5b46..9d7ba39a36 100644
--- a/util/system/align.h
+++ b/util/system/align.h
@@ -15,9 +15,9 @@ static inline T AlignUp(T len, T align) noexcept {
const T alignedResult = AlignDown(len + (align - 1), align);
Y_ASSERT(alignedResult >= len); // check for overflow
return alignedResult;
-}
-
-template <class T>
+}
+
+template <class T>
static inline T AlignUpSpace(T len, T align) noexcept {
Y_ASSERT(IsPowerOf2(align)); // align should be power of 2
return ((T)0 - len) & (align - 1); // AlignUp(len, align) - len;
diff --git a/util/system/align_ut.cpp b/util/system/align_ut.cpp
index 3ba3a3442b..6b24cbac52 100644
--- a/util/system/align_ut.cpp
+++ b/util/system/align_ut.cpp
@@ -1,13 +1,13 @@
-#include "align.h"
-
+#include "align.h"
+
#include <library/cpp/testing/unittest/registar.h>
-class TAlignTest: public TTestBase {
+class TAlignTest: public TTestBase {
UNIT_TEST_SUITE(TAlignTest);
UNIT_TEST(TestDown)
UNIT_TEST(TestUp)
UNIT_TEST_SUITE_END();
-
+
private:
inline void TestDown() {
UNIT_ASSERT(AlignDown(0, 4) == 0);
@@ -30,6 +30,6 @@ private:
UNIT_ASSERT(AlignUp(0, 8) == 0);
UNIT_ASSERT(AlignUp(1, 8) == 8);
}
-};
-
-UNIT_TEST_SUITE_REGISTRATION(TAlignTest);
+};
+
+UNIT_TEST_SUITE_REGISTRATION(TAlignTest);
diff --git a/util/system/context.h b/util/system/context.h
index d2a349bfc5..5f6ac024c6 100644
--- a/util/system/context.h
+++ b/util/system/context.h
@@ -2,7 +2,7 @@
#include "align.h"
#include "defaults.h"
-#include "compiler.h"
+#include "compiler.h"
#include "sanitizers.h"
#include <util/generic/array_ref.h>
diff --git a/util/system/dynlib.cpp b/util/system/dynlib.cpp
index 9d2541c25f..8363db22dc 100644
--- a/util/system/dynlib.cpp
+++ b/util/system/dynlib.cpp
@@ -105,8 +105,8 @@ TDynamicLibrary::TDynamicLibrary(const TString& path, int flags) {
TDynamicLibrary::~TDynamicLibrary() = default;
-void TDynamicLibrary::Open(const char* path, int flags) {
- Impl_.Reset(TImpl::SafeCreate(path, flags));
+void TDynamicLibrary::Open(const char* path, int flags) {
+ Impl_.Reset(TImpl::SafeCreate(path, flags));
}
void TDynamicLibrary::Close() noexcept {
diff --git a/util/system/dynlib.h b/util/system/dynlib.h
index 66eaf4a5c1..d2e426aebb 100644
--- a/util/system/dynlib.h
+++ b/util/system/dynlib.h
@@ -8,18 +8,18 @@
#define Y_GET_FUNC(dll, name) FUNC_##name((dll).Sym(#name))
#define Y_GET_FUNC_OPTIONAL(dll, name) FUNC_##name((dll).SymOptional(#name))
-#ifdef _win32_
+#ifdef _win32_
#define DEFAULT_DLLOPEN_FLAGS 0
-#else
+#else
#include <dlfcn.h>
-
+
#ifndef RTLD_GLOBAL
#define RTLD_GLOBAL (0)
#endif
-
+
#define DEFAULT_DLLOPEN_FLAGS (RTLD_NOW | RTLD_GLOBAL)
-#endif
-
+#endif
+
class TDynamicLibrary {
public:
TDynamicLibrary() noexcept;
diff --git a/util/system/sanitizers.h b/util/system/sanitizers.h
index 965e5c751e..c1896ca637 100644
--- a/util/system/sanitizers.h
+++ b/util/system/sanitizers.h
@@ -60,9 +60,9 @@ namespace NSan {
return true;
#else
return false;
-#endif
+#endif
}
-
+
// Determines if tsan present
inline constexpr static bool TSanIsOn() noexcept {
#if defined(_tsan_enabled_)
diff --git a/util/system/thread.cpp b/util/system/thread.cpp
index 6236746c2d..0cd8c078ea 100644
--- a/util/system/thread.cpp
+++ b/util/system/thread.cpp
@@ -358,7 +358,7 @@ TThread::TId TThread::ImpossibleThreadId() noexcept {
namespace {
template <class T>
- static void* ThreadProcWrapper(void* param) {
+ static void* ThreadProcWrapper(void* param) {
return reinterpret_cast<T*>(param)->ThreadProc();
}
}
diff --git a/util/system/thread.h b/util/system/thread.h
index a6e8abdb5b..612c25f86e 100644
--- a/util/system/thread.h
+++ b/util/system/thread.h
@@ -163,7 +163,7 @@ public:
virtual ~ISimpleThread() = default;
- virtual void* ThreadProc() = 0;
+ virtual void* ThreadProc() = 0;
};
struct TCurrentThreadLimits {