mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 04:22:55 +01:00
util: Pass pthread_self() to pthread_setschedparam instead of 0
Nowhere in the man page of `pthread_setschedparam` it is mentioned that `0` is a valid value. The example uses `pthread_self()`, so should we. (noticed by Anthony Towns)
This commit is contained in:
parent
603975b96a
commit
cff66e6a29
@ -1065,7 +1065,7 @@ int ScheduleBatchPriority(void)
|
||||
{
|
||||
#ifdef SCHED_BATCH
|
||||
const static sched_param param{.sched_priority = 0};
|
||||
if (int ret = pthread_setschedparam(0, SCHED_BATCH, ¶m)) {
|
||||
if (int ret = pthread_setschedparam(pthread_self(), SCHED_BATCH, ¶m)) {
|
||||
LogPrintf("Failed to pthread_setschedparam: %s\n", strerror(errno));
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user