Xenomai
3.0.5
|
Cobalt scheduling management services. More...
Functions | |
int | pthread_setschedparam (pthread_t thread, int policy, const struct sched_param *param) |
Set the scheduling policy and parameters of the specified thread. More... | |
int | pthread_setschedparam_ex (pthread_t thread, int policy, const struct sched_param_ex *param_ex) |
Set extended scheduling policy of thread. More... | |
int | pthread_getschedparam (pthread_t thread, int *__restrict__ policy, struct sched_param *__restrict__ param) |
Get the scheduling policy and parameters of the specified thread. More... | |
int | pthread_getschedparam_ex (pthread_t thread, int *__restrict__ policy_r, struct sched_param_ex *__restrict__ param_ex) |
Get extended scheduling policy of thread. More... | |
int | pthread_yield (void) |
Yield the processor. More... | |
Cobalt scheduling management services.
int pthread_getschedparam | ( | pthread_t | thread, |
int *__restrict__ | policy, | ||
struct sched_param *__restrict__ | param | ||
) |
Get the scheduling policy and parameters of the specified thread.
This service returns, at the addresses policy and par, the current scheduling policy and scheduling parameters (i.e. priority) of the Cobalt thread tid. If thread is not the identifier of a Cobalt thread, this service fallback to the regular POSIX pthread_getschedparam() service.
thread | target thread; |
policy | address where the scheduling policy of tid is stored on success; |
param | address where the scheduling parameters of tid is stored on success. |
References pthread_getschedparam_ex().
Referenced by pthread_getschedparam_ex().
int pthread_getschedparam_ex | ( | pthread_t | thread, |
int *__restrict__ | policy_r, | ||
struct sched_param_ex *__restrict__ | param_ex | ||
) |
Get extended scheduling policy of thread.
This service is an extended version of the regular pthread_getschedparam() service, which also supports Cobalt-specific policies, not available with the host Linux environment.
thread | target thread; |
policy_r | address where the scheduling policy of thread is stored on success; |
param_ex | address where the scheduling parameters of thread are stored on success. |
References pthread_getschedparam().
Referenced by pthread_getschedparam().
int pthread_setschedparam | ( | pthread_t | thread, |
int | policy, | ||
const struct sched_param * | param | ||
) |
Set the scheduling policy and parameters of the specified thread.
This service set the scheduling policy of the Cobalt thread identified by pid to the value policy, and its scheduling parameters (i.e. its priority) to the value pointed to by param.
If pthread_self() is passed, this service turns the current thread into a Cobalt thread. If thread is not the identifier of a Cobalt thread, this service falls back to the regular pthread_setschedparam() service.
thread | target Cobalt thread; |
policy | scheduling policy, one of SCHED_FIFO, SCHED_RR, or SCHED_OTHER; |
param | address of scheduling parameters. |
See pthread_create(), pthread_setschedparam_ex().
References pthread_setschedparam_ex().
Referenced by pthread_join().
int pthread_setschedparam_ex | ( | pthread_t | thread, |
int | policy, | ||
const struct sched_param_ex * | param_ex | ||
) |
Set extended scheduling policy of thread.
This service is an extended version of the regular pthread_setschedparam() service, which supports Cobalt-specific scheduling policies, not available with the host Linux environment.
This service set the scheduling policy of the Cobalt thread thread to the value policy, and its scheduling parameters (e.g. its priority) to the value pointed to by param_ex.
If thread does not match the identifier of a Cobalt thread, this action falls back to the regular pthread_setschedparam() service.
thread | target Cobalt thread; |
policy | scheduling policy, one of SCHED_WEAK, SCHED_FIFO, SCHED_COBALT, SCHED_RR, SCHED_SPORADIC, SCHED_TP, SCHED_QUOTA or SCHED_NORMAL; |
param_ex | scheduling parameters address. As a special exception, a negative sched_priority value is interpreted as if SCHED_WEAK was given in policy, using the absolute value of this parameter as the weak priority level. |
When CONFIG_XENO_OPT_SCHED_WEAK is enabled, SCHED_WEAK exhibits priority levels in the [0..99] range (inclusive). Otherwise, sched_priority must be zero for the SCHED_WEAK policy.
See pthread_create(), pthread_setschedparam().
Referenced by pthread_setschedparam().
int pthread_yield | ( | void | ) |
Yield the processor.
This function move the current thread at the end of its priority group.
0 |
References sched_yield().