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
Use the -l c option to qcc to link against this library. This library is usually included automatically.
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 SchedInfo() and SchedInfo_r() functions are identical except in the way they indicate errors. See the Returns section for details.
Instead of using these kernel calls directly, consider calling sched_get_priority_max(), sched_get_priority_min(), or sched_rr_get_interval(). |
The struct _sched_info structure pointed to by info contains at least these members:
The only difference between these functions is the way they indicate errors:
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |
sched_get_priority_max(), sched_get_priority_min(), sched_rr_get_interval(), SchedGet(), SchedSet()