debug: move to hyprutils' logger (#12673)
This commit is contained in:
parent
f88deb928a
commit
6175ecd4c4
147 changed files with 1696 additions and 1709 deletions
|
|
@ -10,20 +10,20 @@ void NInit::gainRealTime() {
|
|||
struct sched_param param;
|
||||
|
||||
if (pthread_getschedparam(pthread_self(), &old_policy, ¶m)) {
|
||||
Debug::log(WARN, "Failed to get old pthread scheduling priority");
|
||||
Log::logger->log(Log::WARN, "Failed to get old pthread scheduling priority");
|
||||
return;
|
||||
}
|
||||
|
||||
param.sched_priority = minPrio;
|
||||
|
||||
if (pthread_setschedparam(pthread_self(), SCHED_RR, ¶m)) {
|
||||
Debug::log(WARN, "Failed to change process scheduling strategy");
|
||||
Log::logger->log(Log::WARN, "Failed to change process scheduling strategy");
|
||||
return;
|
||||
}
|
||||
|
||||
pthread_atfork(nullptr, nullptr, []() {
|
||||
const struct sched_param param = {.sched_priority = 0};
|
||||
if (pthread_setschedparam(pthread_self(), SCHED_OTHER, ¶m))
|
||||
Debug::log(WARN, "Failed to reset process scheduling strategy");
|
||||
Log::logger->log(Log::WARN, "Failed to reset process scheduling strategy");
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue