Time management functions, Error checking, Caution – Comtrol eCos User Manual

Page 483

Advertising
background image

Chapter 32. µITRON API

In

cre_mpf()

the product of

pk_cmpf-

>

blfsz

and

pk_cmpf-

>

mpfcnt

must be smaller than the memory

statically configured for the pool else E_RSATR

In functions which return memory to the pool

rel_blk()

and

rel_blf()

, if the free fails, for example because

the memory did not come from that pool originally, then E_PAR is returned

Time Management Functions

These functions are fully supported in this release:

ER

set_tim

(

SYSTIME *pk_tim )

Caution

Setting the time may cause erroneous operation of the kernel, for example a task performing
a wait with a time-out may never awaken.

ER

get_tim

(

SYSTIME *pk_tim )

ER

dly_tsk

(

DLYTIME dlytim )

ER

def_cyc

(

HNO cycno,

T_DCYC *pk_dcyc )

ER

act_cyc

(

HNO cycno,

UINT cycact )

ER

ref_cyc

(

T_RCYC *pk_rcyc,

HNO cycno )

ER

def_alm

(

HNO almno,

T_DALM *pk_dalm )

ER

ref_alm

(

T_RALM *pk_ralm,

HNO almno )

void

ret_tmr

( void )

Error checking

The

following

conditions

are

only

checked

for,

and

only

return

errors

if

CYGSEM_UITRON_BAD_PARAMS_RETURN_ERRORS

is enabled:

invalid handler number; less than 1 or greater than

CYGNUM_UITRON_CYCLICS/ALARMS

as appropriate, or

E_PAR

dispatching is enabled in

dly_tsk()

, or E_CTX

379

Advertising