aboutsummaryrefslogtreecommitdiffstats
path: root/util/system/thread.cpp
diff options
context:
space:
mode:
authorDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:50:17 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:50:17 +0300
commit4b11037e5a7d071c63e3c966199fe7102e6462e4 (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /util/system/thread.cpp
parent17e20fa084178ddcb16255f974dbde74fb93608b (diff)
downloadydb-4b11037e5a7d071c63e3c966199fe7102e6462e4.tar.gz
Restoring authorship annotation for Daniil Cherednik <dcherednik@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/system/thread.cpp')
-rw-r--r--util/system/thread.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/util/system/thread.cpp b/util/system/thread.cpp
index 1733fb2942..6236746c2d 100644
--- a/util/system/thread.cpp
+++ b/util/system/thread.cpp
@@ -24,19 +24,19 @@
#include <util/generic/scope.h>
#else
#error "FIXME"
-#endif
-
-bool SetHighestThreadPriority() {
-#ifdef _win_
- return SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_HIGHEST);
-#else
- struct sched_param sch;
- memset(&sch, 0, sizeof(sch));
- sch.sched_priority = 31;
- return pthread_setschedparam(pthread_self(), SCHED_RR, &sch) == 0;
-#endif
-}
-
+#endif
+
+bool SetHighestThreadPriority() {
+#ifdef _win_
+ return SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_HIGHEST);
+#else
+ struct sched_param sch;
+ memset(&sch, 0, sizeof(sch));
+ sch.sched_priority = 31;
+ return pthread_setschedparam(pthread_self(), SCHED_RR, &sch) == 0;
+#endif
+}
+
namespace {
using TParams = TThread::TParams;
using TId = TThread::TId;