Установить параметры планирования и дисциплину потока
#include <sys/neutrino.h>int SchedSet( pid_t pid,int tid,int policy,const struct sched_param *param );int SchedSet_r( pid_t pid,int tid,int policy,const struct sched_param *param );
0
or a process ID.0
or a thread ID.SCHED_FIFO
, except threads at the same priority level timeslice (round robin) every 4 × the clock period (see ClockPeriod()). SCHED_RR
. ![]() | If either the SCHED_ADJTOHEAD or SCHED_ADJTOTAIL options is set, then the struct sched_param field is ignored. |
libc
The SchedSet() and SchedSet_r() kernel calls set both the scheduling policy and the associated 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 tid is zero, then the calling thread is used and pid is ignored.
Данные функции идентичны за исключением способа возврата ошибок.
![]() | Instead of using these kernel calls directly, consider calling pthread_setschedparam() or pthread_setschedprio(). |
These calls don't block.
-1
, код ошибки записывается в errno. Любое другое возвращенное значение считается успешным завершением.EOK
возвращается при успешном завершении. Функция НЕ устанавливает errno. При возникновении ошибки функция возвращает один из представленных ниже кодов.
ЗОСРВ «Нейтрино»
struct sched_param, pthread_setschedparam(), pthread_setschedprio(), sched_get_priority_max(), sched_get_priority_min(), SchedGet(), SchedInfo(), SchedYield()
Предыдущий раздел: Описание API системной библиотеки