Task management functions – Comtrol eCos User Manual

Page 474

Advertising
background image

Chapter 32. µITRON API

file

pkgconf/uitron.h

, and can be set using the configuration tool or editing the

.ecc

file in your build directory

by hand.

An important configuration option for the µITRON compatibility layer is “Option: Return Error Codes for Bad
Params” (

CYGSEM_UITRON_BAD_PARAMS_RETURN_ERRORS

), which allows a lot of the error checking code in the

µITRON compatibility layer to be removed. Of course this leaves a program open to undetected errors, so it should
only be used once an application is fully debugged and tested. Its benefits include reduced code size and faster
execution. However, it affects the API significantly, in that with this option enabled, bad calls do not return errors,
but cause an assert failure (if that is itself enabled) or malfunction internally. There is discussion in more detail
about this in each section below.

We now give a brief description of the µITRON functions which are implemented in this release. Note that all C
and C++ source files should have the following

#include

statement:

#include

<

cyg/compat/uitron/uit_func.h

>

Task Management Functions

The following functions are fully supported in this release:

ER

sta_tsk

(

ID tskid,

INT stacd )

void

ext_tsk

( void )

void

exd_tsk

( void )

ER

dis_dsp

( void )

ER

ena_dsp

( void )

ER

chg_pri

(

ID tskid,

PRI tskpri )

ER

rot_rdq

(

PRI tskpri )

ER

get_tid

(

ID *p_tskid )

ER

ref_tsk

(

T_RTSK *pk_rtsk,

ID tskid )

ER

ter_tsk

(

ID tskid )

ER

rel_wai

(

ID tskid )

370

Advertising