sched_get_priority_adjust()
QNX SDP8.0C Library ReferenceAPIDeveloper
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 policy 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.
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 an errno value.
Errors:
- EINVAL
- The value of the policy parameter doesn't represent a defined scheduling policy.
Classification:
Safety: | |
---|---|
Cancellation point | No |
Signal handler | Yes |
Thread | Yes |
Page updated: