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_get_priority_adjust.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_get_priority_adjust.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_get_priority_adjust.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_get_priority_adjust.html on line 8

sched_get_priority_adjust()

Calculate the allowable priority for the scheduling policy

Synopsis:

#include <sched.h>

int sched_get_priority_adjust( int prio,
                               int policy,
                               int adjust );

Arguments:

prio
The original priority value. If negative, the priority of the calling thread is used.
policy
The scheduling algorithm being used. The valid arguments are listed in sched_get_priority_max(). If policy is SCHED_NOCHANGE, the function uses the algorithm of the calling thread.
adjust
The priority change, relative to prio. A value of +10 results in a final priority of prio+10, provided that this amount of adjustment is allowed.

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.


Note: This function is in libc.a, but not in libc.so (in order to save space).

Description:

The sched_get_priority_adjust() function calculates the requested priority change relative to another thread and returns the allowable value.

This function makes it easier for you to set relative priorities in order to ensure proper precedence.

Returns:

>0
The allowed priority value. The value will never exceed the range of values allowed by sched_get_priority_min() and sched_get_priority_max().
<0
Failure; the negative of the errno value.

Errors:

EINVAL
The value of the policy parameter doesn't represent a defined scheduling policy.

Classification:

QNX Neutrino

Safety:
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

errno, sched_getparam(), sched_get_priority_max(), sched_get_priority_min(), sched_setparam(), sched_getscheduler(), sched_setscheduler()


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_get_priority_adjust.html on line 173

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_get_priority_adjust.html on line 173