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/sched_getscheduler.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/sched_getscheduler.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/sched_getscheduler.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/sched_getscheduler.html on line 8
Get the current scheduling policy for a process
#include <sched.h>
int sched_getscheduler( pid_t pid );
- pid
- The ID of the process whose scheduling policy you want to find, or
zero if you want to get the policy for the current process.
libc
Use the -l c option to
qcc
to link against this library.
This library is usually included automatically.
The sched_getscheduler() function gets the current scheduling policy of process pid.
If pid is zero, the scheduling policy of the calling process is returned.
The scheduling policy, or -1 if an error occurred (errno is set).
- ESRCH
- The process pid doesn't exist.
POSIX 1003.1 PS
Safety: | |
Cancellation point |
No |
Interrupt handler |
No |
Signal handler |
Yes |
Thread |
Yes |
In a multithreaded program, sched_getscheduler() returns
the scheduling policy for thread 1 in the process pid,
or for the calling thread if pid is 0.
errno,
getprio(),
sched_getparam(),
sched_get_priority_max(),
sched_get_priority_min(),
sched_setparam(),
sched_setscheduler(),
sched_yield(),
setprio()
“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/sched_getscheduler.html on line 142
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/sched_getscheduler.html on line 142