aboutsummaryrefslogtreecommitdiffstats
path: root/util/system
diff options
context:
space:
mode:
authorIvan Komarov <Ivan.Komarov@dfyz.info>2022-02-10 16:46:48 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:48 +0300
commit4de97ab2fe437cbe83e4c63234e809ddd5ac34f2 (patch)
treeff8fb38b661955e6c99d1d000d6c72f739199590 /util/system
parent9abfb1a53b7f7b791444d1378e645d8fad9b06ed (diff)
downloadydb-4de97ab2fe437cbe83e4c63234e809ddd5ac34f2.tar.gz
Restoring authorship annotation for Ivan Komarov <Ivan.Komarov@dfyz.info>. Commit 1 of 2.
Diffstat (limited to 'util/system')
-rw-r--r--util/system/context.h2
-rw-r--r--util/system/datetime.cpp2
-rw-r--r--util/system/datetime.h20
-rw-r--r--util/system/direct_io.cpp4
-rw-r--r--util/system/info.cpp2
5 files changed, 15 insertions, 15 deletions
diff --git a/util/system/context.h b/util/system/context.h
index d2a349bfc5..e02b6a13ca 100644
--- a/util/system/context.h
+++ b/util/system/context.h
@@ -20,7 +20,7 @@
/*
* switch method
*/
-#if defined(_bionic_) || defined(__IOS__)
+#if defined(_bionic_) || defined(__IOS__)
#define USE_GENERIC_CONT
#elif defined(_cygwin_)
#define USE_UCONTEXT_CONT
diff --git a/util/system/datetime.cpp b/util/system/datetime.cpp
index b07b50679a..60c4150298 100644
--- a/util/system/datetime.cpp
+++ b/util/system/datetime.cpp
@@ -94,7 +94,7 @@ void NanoSleep(ui64 ns) noexcept {
#endif
}
-#if defined(_x86_)
+#if defined(_x86_)
extern const bool HaveRdtscp = NX86::HaveRDTSCP();
#endif
diff --git a/util/system/datetime.h b/util/system/datetime.h
index aa009974e0..e7fedbbfed 100644
--- a/util/system/datetime.h
+++ b/util/system/datetime.h
@@ -68,20 +68,20 @@ Y_FORCE_INLINE ui64 GetCycleCount() noexcept {
return ((unsigned long long)lo) | (((unsigned long long)hi) << 32);
#elif defined(_i386_)
- extern const bool HaveRdtscp;
-
+ extern const bool HaveRdtscp;
+
ui64 x;
- if (HaveRdtscp) {
- __asm__ volatile("rdtscp\n\t"
- : "=A"(x)::"%ecx");
- } else {
- __asm__ volatile("rdtsc\n\t"
- : "=A"(x));
- }
+ if (HaveRdtscp) {
+ __asm__ volatile("rdtscp\n\t"
+ : "=A"(x)::"%ecx");
+ } else {
+ __asm__ volatile("rdtsc\n\t"
+ : "=A"(x));
+ }
return x;
#elif defined(_darwin_)
return mach_absolute_time();
-#elif defined(__clang__) && !defined(_arm_)
+#elif defined(__clang__) && !defined(_arm_)
return __builtin_readcyclecounter();
#elif defined(_arm32_)
return MicroSeconds();
diff --git a/util/system/direct_io.cpp b/util/system/direct_io.cpp
index f59c54b0cb..58a72e0f48 100644
--- a/util/system/direct_io.cpp
+++ b/util/system/direct_io.cpp
@@ -2,7 +2,7 @@
#include <util/generic/singleton.h>
#include <util/generic/yexception.h>
-#include <util/system/info.h>
+#include <util/system/info.h>
#include "align.h"
#ifdef _linux_
@@ -32,7 +32,7 @@ namespace {
if (linuxVersionCode < KERNEL_VERSION(2, 4, 10)) {
Alignment = 0;
} else if (linuxVersionCode < KERNEL_VERSION(2, 6, 0)) {
- Alignment = NSystemInfo::GetPageSize();
+ Alignment = NSystemInfo::GetPageSize();
} else {
// Default alignment used to be 512, but most modern devices rely on 4k physical blocks.
// 4k alignment works well for both 512 and 4k blocks and doesn't require 512e support in the kernel.
diff --git a/util/system/info.cpp b/util/system/info.cpp
index cf6681e89a..88cd24afb2 100644
--- a/util/system/info.cpp
+++ b/util/system/info.cpp
@@ -183,7 +183,7 @@ size_t NSystemInfo::GetPageSize() noexcept {
return sysInfo.dwPageSize;
#else
- return sysconf(_SC_PAGESIZE);
+ return sysconf(_SC_PAGESIZE);
#endif
}