Taskdependent synchronization functions, Error checking, Task-dependent synchronization functions – Comtrol eCos User Manual
Page 476

Chapter 32. µITRON API
•
ter_tsk()
: the task must not be dormant, else E_OBJ
•
chg_pri()
: the task must not be dormant, else E_OBJ
•
rel_wai()
: the task must be in
WAIT
or
WAIT-SUSPEND
state, else E_OBJ
Task-Dependent Synchronization Functions
These functions are fully supported in this release:
ER
sus_tsk
(
ID tskid )
ER
rsm_tsk
(
ID tskid )
ER
frsm_tsk
(
ID tskid )
ER
slp_tsk
( void )
ER
tslp_tsk
(
TMO tmout )
ER
wup_tsk
(
ID tskid )
ER
can_wup
(
INT *p_wupcnt,
ID tskid )
Error checking
The
following
conditions
are
only
checked
for,
and
only
return
errors
if
CYGSEM_UITRON_BAD_PARAMS_RETURN_ERRORS
is
enabled
(see
the
configuration
option
“Return Error Codes for Bad Params”):
•
invalid tskid; less than 1 or greater than
CYGNUM_UITRON_TASKS
returns E_ID
•
wup_tsk()
,
sus_tsk()
,
rsm_tsk()
,
frsm_tsk()
on the calling task returns E_OBJ
•
dispatching is enabled in
tslp_tsk()
and
slp_tsk()
, or E_CTX
•
tmout must be positive, otherwise E_PAR
•
return value pointer in
can_wup()
is a valid pointer, or E_PAR
The following conditions are checked for, and can return error codes, regardless of the setting of
CYGSEM_UITRON_BAD_PARAMS_RETURN_ERRORS
:
•
When create and delete functions
cre_tsk()
and
del_tsk()
are supported, all calls which use a valid task ID
number check that the task exists; if not, E_NOEXS is returned
•
sus_tsk()
: the task must not be dormant, else E_OBJ
372