Get the scheduling policy and parameters for a thread
#include <sys/neutrino.h> int SchedGet( pid_t pid, int tid, struct sched_param *param ); int SchedGet_r( pid_t pid, int tid, struct sched_param *param );
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The SchedGet() and SchedGet_r() kernel calls return the current scheduling policy and parameters for the thread specified by tid in the process specified by pid. If pid is zero, the current process is used to look up a nonzero tid. If pid and tid are zero, then the calling thread is used.
These functions are identical except in the way they indicate errors. See the Returns section for details.
The scheduling policy is returned on success and is one of SCHED_FIFO, SCHED_RR, SCHED_SPORADIC, or SCHED_OTHER.
Blocking states
These calls don't block.
The current scheduling policy. If an error occurs:
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |