v29.4-roots.1 · Commit 2: [PATCH 02/13] runtime: preserve shared operator controls
src/util/batchpriority.cpp
Before: src/util/batchpriority.cpp · After: src/util/batchpriority.cpp
File metadata
index c73aef1eb48b6b31ce2280f699d13bb442405c7e..3d2680d2c0c49e10ba9b4c6287b0c8e849128707 100644
Download original patch · Release notes
Diff rows 1–27 of 27. Line numbers refer to the original before/after files.
+ Added− RemovedUnmarked lines are context.
Scroll the code area horizontally to read long lines. The two line-number columns refer to before and after.
src/util/batchpriority.cpp
CHANGED
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
// Distributed under the MIT software license, see the accompanying
|
|
3
3
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
4
4
|
|
|
5
|
+
#include <util/batchpriority.h>
|
|
6
|
+
|
|
5
7
|
#include <logging.h>
|
|
6
8
|
#include <util/syserror.h>
|
|
7
9
|
|
|
8
|
-
#if (defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__))
|
|
9
|
-
#include <pthread.h>
|
|
10
|
-
#include <pthread_np.h>
|
|
11
|
-
#endif
|
|
10
|
+
#include <string>
|
|
12
11
|
|
|
13
12
|
#ifndef WIN32
|
|
13
|
+
#include <pthread.h>
|
|
14
14
|
#include <sched.h>
|
|
15
15
|
#endif
|
|
16
16
|
|
|
@@ -20,7 +20,7 @@ void ScheduleBatchPriority()
|
|
|
20
20
|
const static sched_param param{};
|
|
21
21
|
const int rc = pthread_setschedparam(pthread_self(), SCHED_BATCH, ¶m);
|
|
22
22
|
if (rc != 0) {
|
|
23
|
-
LogPrintf("Failed to pthread_setschedparam: %s\n", SysErrorString(rc));
|
|
23
|
+
LogWarning("Failed to pthread_setschedparam: %s", SysErrorString(rc));
|
|
24
24
|
}
|
|
25
25
|
#endif
|
|
26
26
|
}
|