diff options
author | Stanislav Kirillov <staskirillov@gmail.com> | 2022-02-10 16:46:08 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:08 +0300 |
commit | cb68f224c46a8ee52ac3fdd2a32534b8bb8dc134 (patch) | |
tree | 1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /util/system | |
parent | 92fe2b1e7bc79f7b95adef61714fc003f6ea4a1c (diff) | |
download | ydb-cb68f224c46a8ee52ac3fdd2a32534b8bb8dc134.tar.gz |
Restoring authorship annotation for Stanislav Kirillov <staskirillov@gmail.com>. Commit 2 of 2.
Diffstat (limited to 'util/system')
-rw-r--r-- | util/system/atexit.cpp | 8 | ||||
-rw-r--r-- | util/system/atexit.h | 16 | ||||
-rw-r--r-- | util/system/datetime.h | 16 | ||||
-rw-r--r-- | util/system/execpath.cpp | 2 | ||||
-rw-r--r-- | util/system/thread.cpp | 10 | ||||
-rw-r--r-- | util/system/tls.h | 2 |
6 files changed, 27 insertions, 27 deletions
diff --git a/util/system/atexit.cpp b/util/system/atexit.cpp index 9e576dce45..74fb10b6b1 100644 --- a/util/system/atexit.cpp +++ b/util/system/atexit.cpp @@ -104,10 +104,10 @@ namespace { } } -void ManualRunAtExitFinalizers() { - OnExit(); -} - +void ManualRunAtExitFinalizers() { + OnExit(); +} + bool ExitStarted() { if (TAtExit* const atExit = AtomicGet(atExitPtr)) { return atExit->FinishStarted(); diff --git a/util/system/atexit.h b/util/system/atexit.h index a4343d5c60..eb3188615c 100644 --- a/util/system/atexit.h +++ b/util/system/atexit.h @@ -12,11 +12,11 @@ void AtExit(TTraditionalAtExitFunc func); void AtExit(TTraditionalAtExitFunc func, size_t priority); bool ExitStarted(); - -/** - * Generally it's a bad idea to call this method except for some rare cases, - * like graceful python DLL module unload. - * This function is not threadsafe. - * Calls in the moment when application is not terminating - bad idea. - */ -void ManualRunAtExitFinalizers(); + +/** + * Generally it's a bad idea to call this method except for some rare cases, + * like graceful python DLL module unload. + * This function is not threadsafe. + * Calls in the moment when application is not terminating - bad idea. + */ +void ManualRunAtExitFinalizers(); diff --git a/util/system/datetime.h b/util/system/datetime.h index e69a0ef27f..aa009974e0 100644 --- a/util/system/datetime.h +++ b/util/system/datetime.h @@ -45,14 +45,14 @@ 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. - extern const bool HaveRdtscp; - - if (HaveRdtscp) { - unsigned int aux; - return __rdtscp(&aux); - } else { - return __rdtsc(); - } + extern const bool HaveRdtscp; + + if (HaveRdtscp) { + unsigned int aux; + return __rdtscp(&aux); + } else { + return __rdtsc(); + } #elif defined(_x86_64_) extern const bool HaveRdtscp; diff --git a/util/system/execpath.cpp b/util/system/execpath.cpp index 8d506808c3..33198af58b 100644 --- a/util/system/execpath.cpp +++ b/util/system/execpath.cpp @@ -145,7 +145,7 @@ static TString GetExecPathImpl() { if (FreeBSDGuessExecBasePath(getenv("PWD"), execPath)) { return execPath; } - if (FreeBSDGuessExecBasePath(NFs::CurrentWorkingDirectory(), execPath)) { + if (FreeBSDGuessExecBasePath(NFs::CurrentWorkingDirectory(), execPath)) { return execPath; } diff --git a/util/system/thread.cpp b/util/system/thread.cpp index 23653dd96d..6236746c2d 100644 --- a/util/system/thread.cpp +++ b/util/system/thread.cpp @@ -452,9 +452,9 @@ void TThread::SetCurrentThreadName(const char* name) { pthread_t thread = pthread_self(); pthread_set_name_np(thread, name); #elif defined(_linux_) - prctl(PR_SET_NAME, name, 0, 0, 0); + prctl(PR_SET_NAME, name, 0, 0, 0); #elif defined(_darwin_) - pthread_setname_np(name); + pthread_setname_np(name); #elif defined(_win_) auto api = Singleton<TWinThreadDescrAPI>(); if (api->HasAPI()) { @@ -514,18 +514,18 @@ TCurrentThreadLimits::TCurrentThreadLimits() noexcept : StackBegin(nullptr) , StackLength(0) { -#if defined(_linux_) || defined(_cygwin_) || defined(_freebsd_) +#if defined(_linux_) || defined(_cygwin_) || defined(_freebsd_) pthread_attr_t attr; pthread_attr_init(&attr); #if defined(_linux_) || defined(_cygwin_) Y_VERIFY(pthread_getattr_np(pthread_self(), &attr) == 0, "pthread_getattr failed"); #else - Y_VERIFY(pthread_attr_get_np(pthread_self(), &attr) == 0, "pthread_attr_get_np failed"); + Y_VERIFY(pthread_attr_get_np(pthread_self(), &attr) == 0, "pthread_attr_get_np failed"); #endif pthread_attr_getstack(&attr, (void**)&StackBegin, &StackLength); pthread_attr_destroy(&attr); - + #elif defined(_darwin_) StackBegin = pthread_get_stackaddr_np(pthread_self()); StackLength = pthread_get_stacksize_np(pthread_self()); diff --git a/util/system/tls.h b/util/system/tls.h index ab89a4f713..3c4f56dbeb 100644 --- a/util/system/tls.h +++ b/util/system/tls.h @@ -7,7 +7,7 @@ #include <new> -#if defined(_darwin_) +#if defined(_darwin_) #define Y_DISABLE_THRKEY_OPTIMIZATION #endif |