![]() |
![]() |
![]() |
Get scheduler information
#include <sys/neutrino.h> int SchedInfo( pid_t pid, int policy, struct _sched_info* info ); int SchedInfo_r( pid_t pid, int policy, struct _sched_info* info );
libc
The SchedInfo() and SchedInfo_r() functions are identical except in the way they indicate errors. See the Returns section for details.
These kernel calls return information about the kernel's thread scheduler, including the minimum and maximum thread priority, for the process ID specified by pid when using the specified scheduling policy. If pid is 0, the scheduler information for the current process is returned. In either case, the struct _sched_info pointed to by info is filled in with the appropriate information.
The policy must be one of the following:
Policy | Description |
---|---|
SCHED_FIFO | A fixed priority scheduler in which the highest priority ready thread will run until it blocks or is preempted by a higher priority thread. |
SCHED_RR | The same as SCHED_FIFO except threads at the same priority level will time slice (round robin) every 50 msec. |
SCHED_OTHER | Currently the same as SCHED_RR. |
The struct _sched_info structure pointed to by info contains at least these members:
Member | Description |
---|---|
uint64_t interval | The current execution time limit before the thread is suspended in favor of the scheduler. |
int priority_max | The maximum priority for a thread using this scheduling policy. |
int priority_min | The minimum priority for a thread using this scheduling policy. |
The only difference between these functions is the way they indicate errors:
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |
![]() |
![]() |
![]() |