mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 18:53:23 -03:00
Merge #19194: util: Don't reference errno when pthread fails.
cb38b069b0
util: Don't reference errno when pthread fails. (MIZUTA Takeshi) Pull request description: Pthread library does not set errno. Pthread library's errno is returned by return value. ACKs for top commit: practicalswift: ACKcb38b069b0
-- patch looks correct MarcoFalke: review ACKcb38b069b0
hebasto: ACKcb38b069b0
, only squashed commits since the [previous](https://github.com/bitcoin/bitcoin/pull/19194#pullrequestreview-425831739) review. Tree-SHA512: e6c950e30726e5031db97a7b84c8a9215da5ad3e5d233bcc349f812ad15957ddfe378e26d18339b9e0a5dcac2f50b47a687b87a6a6beaf6139df84f31531321e
This commit is contained in:
commit
9573d2b55b
1 changed files with 3 additions and 2 deletions
|
@ -1163,8 +1163,9 @@ void ScheduleBatchPriority()
|
|||
{
|
||||
#ifdef SCHED_BATCH
|
||||
const static sched_param param{};
|
||||
if (pthread_setschedparam(pthread_self(), SCHED_BATCH, ¶m) != 0) {
|
||||
LogPrintf("Failed to pthread_setschedparam: %s\n", strerror(errno));
|
||||
const int rc = pthread_setschedparam(pthread_self(), SCHED_BATCH, ¶m);
|
||||
if (rc != 0) {
|
||||
LogPrintf("Failed to pthread_setschedparam: %s\n", strerror(rc));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue