linux's sched_* syscalls actually implement the TPS (thread scheduling) functionality, not the PS (process scheduling) functionality which the sched_* functions are supposed to have. omitting support for the PS option (and having the sched_* interfaces fail with ENOSYS rather than omitting them, since some broken software assumes they exist) seems to be the only conforming way to do this on linux.
13 lines
234 B
C
13 lines
234 B
C
#include <sched.h>
|
|
#include "syscall.h"
|
|
|
|
int sched_get_priority_max(int policy)
|
|
{
|
|
return syscall(SYS_sched_get_priority_max, policy);
|
|
}
|
|
|
|
int sched_get_priority_min(int policy)
|
|
{
|
|
return syscall(SYS_sched_get_priority_min, policy);
|
|
}
|