diff options
author | abolkhovityanov <abolkhovityanov@yandex-team.ru> | 2022-02-10 16:50:49 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:50:49 +0300 |
commit | 812751ae6997d4a9efaca424ef7b2e1d06fa3771 (patch) | |
tree | 3bdff9442b38b433a98640c47522ba7c66bed0d1 /util | |
parent | 90e989b502f29f2d1176402f08e85953ae199004 (diff) | |
download | ydb-812751ae6997d4a9efaca424ef7b2e1d06fa3771.tar.gz |
Restoring authorship annotation for <abolkhovityanov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util')
-rw-r--r-- | util/system/atomic_win.h | 4 | ||||
-rw-r--r-- | util/system/datetime.h | 4 | ||||
-rw-r--r-- | util/system/platform.h | 46 | ||||
-rw-r--r-- | util/system/progname_ut.cpp | 2 |
4 files changed, 28 insertions, 28 deletions
diff --git a/util/system/atomic_win.h b/util/system/atomic_win.h index 65c290e6cc..ea0e393955 100644 --- a/util/system/atomic_win.h +++ b/util/system/atomic_win.h @@ -48,7 +48,7 @@ static inline intptr_t AtomicGetAndCas(TAtomic* a, intptr_t exchange, intptr_t c return _InterlockedCompareExchange((volatile long*)a, exchange, compare); } -#else // _x86_64_ +#else // _x86_64_ #pragma intrinsic(_InterlockedIncrement64) #pragma intrinsic(_InterlockedDecrement64) @@ -104,7 +104,7 @@ static inline intptr_t AtomicXor(TAtomic& a, intptr_t b) { return _InterlockedXor64(&a, b) ^ b; } -#endif // _x86_ +#endif // _x86_ //TODO static inline void AtomicBarrier() { diff --git a/util/system/datetime.h b/util/system/datetime.h index aa009974e0..0e5235ef24 100644 --- a/util/system/datetime.h +++ b/util/system/datetime.h @@ -6,7 +6,7 @@ #if defined(_win_) #include <intrin.h> #pragma intrinsic(__rdtsc) -#endif // _win_ +#endif // _win_ #if defined(_darwin_) && !defined(_x86_) #include <mach/mach_time.h> @@ -44,7 +44,7 @@ void NanoSleep(ui64 ns) noexcept; Y_FORCE_INLINE ui64 GetCycleCount() noexcept { #if defined(_MSC_VER) // Generates the rdtscp instruction, which returns the processor time stamp. - // The processor time stamp records the number of clock cycles since the last reset. + // The processor time stamp records the number of clock cycles since the last reset. extern const bool HaveRdtscp; if (HaveRdtscp) { diff --git a/util/system/platform.h b/util/system/platform.h index 58f310ab34..d2264fe57a 100644 --- a/util/system/platform.h +++ b/util/system/platform.h @@ -81,13 +81,13 @@ #define _arm_ #endif -/* __ia64__ and __x86_64__ - defined by GNU C. - * _M_IA64, _M_X64, _M_AMD64 - defined by Visual Studio. - * - * Microsoft can define _M_IX86, _M_AMD64 (before Visual Studio 8) - * or _M_X64 (starting in Visual Studio 8). - */ -#if defined(__x86_64__) || defined(_M_X64) || defined(_M_AMD64) +/* __ia64__ and __x86_64__ - defined by GNU C. + * _M_IA64, _M_X64, _M_AMD64 - defined by Visual Studio. + * + * Microsoft can define _M_IX86, _M_AMD64 (before Visual Studio 8) + * or _M_X64 (starting in Visual Studio 8). + */ +#if defined(__x86_64__) || defined(_M_X64) || defined(_M_AMD64) #define _x86_64_ #endif @@ -95,7 +95,7 @@ #define _i386_ #endif -#if defined(__ia64__) || defined(_M_IA64) +#if defined(__ia64__) || defined(_M_IA64) #define _ia64_ #endif @@ -109,8 +109,8 @@ #if !defined(sparc) && !defined(__sparc) && !defined(__hpux__) && !defined(__alpha__) && !defined(_ia64_) && !defined(_x86_64_) && !defined(_arm_) && !defined(_i386_) && !defined(_ppc_) && !defined(_ppc64_) #error "platform not defined, please, define one" -#endif - +#endif + #if defined(_x86_64_) || defined(_i386_) #define _x86_ #endif @@ -189,18 +189,18 @@ #define _32_ #endif -/* All modern 64-bit Unix systems use scheme LP64 (long, pointers are 64-bit). - * Microsoft uses a different scheme: LLP64 (long long, pointers are 64-bit). - * - * Scheme LP64 LLP64 - * char 8 8 - * short 16 16 - * int 32 32 - * long 64 32 - * long long 64 64 - * pointer 64 64 - */ - +/* All modern 64-bit Unix systems use scheme LP64 (long, pointers are 64-bit). + * Microsoft uses a different scheme: LLP64 (long long, pointers are 64-bit). + * + * Scheme LP64 LLP64 + * char 8 8 + * short 16 16 + * int 32 32 + * long 64 32 + * long long 64 64 + * pointer 64 64 + */ + #if defined(_32_) #define SIZEOF_PTR 4 #elif defined(_64_) @@ -231,7 +231,7 @@ #define SIZEOF_LONG 8 #define SIZEOF_UNSIGNED_LONG 8 #endif // _win_ -#endif // _32_ +#endif // _32_ #if !defined(SIZEOF_LONG) #error todo diff --git a/util/system/progname_ut.cpp b/util/system/progname_ut.cpp index 11f3d9308b..c9ddbb51cd 100644 --- a/util/system/progname_ut.cpp +++ b/util/system/progname_ut.cpp @@ -7,7 +7,7 @@ Y_UNIT_TEST_SUITE(TProgramNameTest) { TString progName = GetProgramName(); try { - UNIT_ASSERT( + UNIT_ASSERT( progName.find("ut_util") != TString::npos || progName.find("util-system_ut") != TString::npos || progName.find("util-system-ut") != TString::npos); } catch (...) { Cerr << progName << Endl; |