diff options
author | Ivan Komarov <Ivan.Komarov@dfyz.info> | 2022-02-10 16:46:49 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:49 +0300 |
commit | 59aca5c5180c31691884667783dc966eb99d743a (patch) | |
tree | 49e222ea1c5804306084bb3ae065bb702625360f /util/system | |
parent | 4de97ab2fe437cbe83e4c63234e809ddd5ac34f2 (diff) | |
download | ydb-59aca5c5180c31691884667783dc966eb99d743a.tar.gz |
Restoring authorship annotation for Ivan Komarov <Ivan.Komarov@dfyz.info>. Commit 2 of 2.
Diffstat (limited to 'util/system')
-rw-r--r-- | util/system/context.h | 2 | ||||
-rw-r--r-- | util/system/datetime.cpp | 2 | ||||
-rw-r--r-- | util/system/datetime.h | 20 | ||||
-rw-r--r-- | util/system/direct_io.cpp | 4 | ||||
-rw-r--r-- | util/system/info.cpp | 2 |
5 files changed, 15 insertions, 15 deletions
diff --git a/util/system/context.h b/util/system/context.h index e02b6a13ca..d2a349bfc5 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 60c4150298..b07b50679a 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 e7fedbbfed..aa009974e0 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 58a72e0f48..f59c54b0cb 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 88cd24afb2..cf6681e89a 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 } |