diff options
author | Daniil Cherednik <[email protected]> | 2022-02-10 16:50:16 +0300 |
---|---|---|
committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:50:16 +0300 |
commit | 17e20fa084178ddcb16255f974dbde74fb93608b (patch) | |
tree | 39605336c0b4d33928df69a256102c515fdf6ff5 /util/system/thread.cpp | |
parent | 97df5ca7413550bf233fc6c7210e292fca0a51af (diff) |
Restoring authorship annotation for Daniil Cherednik <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'util/system/thread.cpp')
-rw-r--r-- | util/system/thread.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/util/system/thread.cpp b/util/system/thread.cpp index 6236746c2d9..1733fb2942a 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; |