aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2019-01-16 16:52:54 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2019-01-16 17:09:12 +0100
commitfcb6694a9945d2a02f40587e18bd395ef64048e0 (patch)
treebf8664c712a0e4bce76b328eb93d0d26a9d5eb1d /src/util
parentf71c2ea6620a262dd97ba01bdd3dfb3e619cb8cb (diff)
parent89282379baa503156d9b85f116ae5672f8588b39 (diff)
Merge #14839: [rebase] threads: fix unitialized members in sched_param
89282379baa503156d9b85f116ae5672f8588b39 threads: fix unitialized members in sched_param (Cory Fields) Pull request description: Rebased theuni's #14342. Building with gcc 8.2 against musl libc, which apparently has more attributes available in its sched_param. The following warnings were produced: warning: missing initializer for member 'sched_param::sched_ss_low_priority' [-Wmissing-field-initializers] warning: missing initializer for member 'sched_param::sched_ss_repl_period' [-Wmissing-field-initializers] warning: missing initializer for member 'sched_param::sched_ss_init_budget' [-Wmissing-field-initializers] warning: missing initializer for member 'sched_param::sched_ss_max_repl' [-Wmissing-field-initializers] Since the current thread may have interesting non-zero values for these fields, we want to be sure to only change the intended one. Query and modify the current sched_param rather than starting from a zeroed one. Tree-SHA512: a0bedbcf0130b3ee8261bb704e4bf6c9b760ad377c8a28c258765d54e54462b76707efc188b936b0a635cdd2bdf6b3b9298ab06ba361dc4806150b670d9702a3
Diffstat (limited to 'src/util')
-rw-r--r--src/util/system.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/system.cpp b/src/util/system.cpp
index 7f2e9a3114..3ef8111b32 100644
--- a/src/util/system.cpp
+++ b/src/util/system.cpp
@@ -1290,7 +1290,7 @@ fs::path AbsPathForConfigVal(const fs::path& path, bool net_specific)
int ScheduleBatchPriority()
{
#ifdef SCHED_BATCH
- const static sched_param param{0};
+ const static sched_param param{};
if (int ret = pthread_setschedparam(pthread_self(), SCHED_BATCH, &param)) {
LogPrintf("Failed to pthread_setschedparam: %s\n", strerror(errno));
return ret;