eCos Reference Manual
Prev | Chapter 32. µITRON API | Next

# 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

- dlytim must be positive or zero, otherwise E_PAR

- return value pointer in `ref_xxx()` is a valid pointer, or E_PAR

- params within pk_dalm and pk_dcyc must be valid, or E_PAR

- cycact in `act_cyc()` must be valid, or E_PAR

- handler must be defined in `ref_xxx()` and `act_cyc()` , or E_NOEXS

- parameter pointer must be a good pointer in `get_tim()` and `set_tim()` , otherwise E_PAR is returned

The following conditions are checked for, and can return error codes, regardless of the setting of `CYGSEM_UITRON_BAD_PARAMS_RETURN_ERRORS` :

- `dly_tsk()` : return code E_RLWAI is returned depending on the reason for terminating the sleep

Prev | Home | Next
Memory pool Management Functions | Up | System Management Functions