mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-13 01:52:50 -05:00
Some FreeBSD fixes
This commit is contained in:
@@ -21,7 +21,6 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#include <sched.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -116,6 +115,7 @@ void Platform::setThreadPriority(int priority)
|
||||
|
||||
setpriority(PRIO_PROCESS, 0, prio);
|
||||
|
||||
#ifdef SCHED_IDLE
|
||||
if (priority == 0) {
|
||||
sched_param param;
|
||||
param.sched_priority = 0;
|
||||
@@ -124,4 +124,5 @@ void Platform::setThreadPriority(int priority)
|
||||
sched_setscheduler(0, SCHED_BATCH, ¶m);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user