Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/s/schedget.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/s/schedget.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/s/schedget.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/s/schedget.html on line 8
Get the scheduling policy 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 );
- pid
- 0 or a process ID; see below.
- tid
- 0 or a thread ID; see below.
- param
- A pointer to a
sched_param
structure where the function can store the scheduling parameters.
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 the 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,
SCHED_OTHER,
SCHED_ADJTOHEAD, or
SCHED_ADJTOTAIL.
These calls don't block.
The only difference between these functions is the way they indicate errors:
- SchedGet()
- The current scheduling policy. If an error occurs, -1 is returned and
errno
is set.
- SchedGet_r()
- The current scheduling policy.
This function does NOT set errno.
If an error occurs, the negative of a value from the Errors section is returned.
- EFAULT
- A fault occurred when the kernel tried to access the buffers provided.
- ESRCH
- The process indicated by pid or thread indicated by tid doesn't exist.
QNX Neutrino
Safety: | |
Cancellation point |
No |
Interrupt handler |
No |
Signal handler |
Yes |
Thread |
Yes |
pthread_getschedparam(),
sched_param,
SchedInfo(),
SchedSet(),
SchedYield()
“Thread scheduling”
in the QNX Neutrino Microkernel chapter of the
System Architecture guide
“Scheduling algorithms”
in the Programming Overview chapter of the
QNX Neutrino Programmer's Guide
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/s/schedget.html on line 214
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/s/schedget.html on line 214