Some FreeBSD fixes
This commit is contained in:
parent
1af1ba6b5f
commit
9c0fe73102
4 changed files with 23 additions and 4 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue