Some FreeBSD fixes

This commit is contained in:
vcambur 2017-10-20 08:41:08 +00:00
parent 1af1ba6b5f
commit 9c0fe73102
4 changed files with 23 additions and 4 deletions

View file

@ -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, &param);
}
}
#endif
}