Error checking – Comtrol eCos User Manual
Page 478

Chapter 32. µITRON API
T_MSG **ppk_msg,
ID mbxid )
ER
trcv_msg
(
T_MSG **ppk_msg,
ID mbxid ,
TMO tmout )
ER
ref_mbx
(
T_RMBX *pk_rmbx,
ID mbxid )
The following functions are supported in this release (with some restrictions) if enabled with the appropriate con-
figuration option for the object type (for example
CYGPKG_UITRON_SEMAS_CREATE_DELETE
):
ER
cre_sem
(
ID semid,
T_CSEM *pk_csem )
ER
del_sem
(
ID semid )
ER
cre_flg
(
ID flgid,
T_CFLG *pk_cflg )
ER
del_flg
(
ID flgid )
ER
cre_mbx
(
ID mbxid,
T_CMBX *pk_cmbx )
ER
del_mbx
(
ID mbxid )
In general the queueing order when waiting on a synchronization object depends on the underlying kernel config-
uration. The multi-level queue scheduler is required for strict µITRON conformance and it queues tasks in FIFO
order, so requests to create an object with priority queueing of tasks (
pk_cxxx-
>
xxxatr = TA_TPRI
) are rejected
with E_RSATR. Additional undefined bits in the attributes fields must be zero.
In general, extended information (pk_cxxx->exinf) is ignored.
For semaphores, the initial semaphore count (pk_csem->isemcnt) is supported; the new semaphore’s count is set.
The maximum count is not supported, and is not in fact defined in type pk_csem.
For flags, multiple tasks are allowed to wait. Because single task waiting is a subset of this, the W bit (TA_WMUL)
of the flag attributes is ignored; all other bits must be zero. The initial flag value is supported.
For
mailboxes,
the
buffer
count
is
defined
statically
by
kernel
configuration
option
CYGNUM_KERNEL_SYNCH_MBOX_QUEUE_SIZE
; therefore the buffer count field is not supported and is not in fact
defined in type pk_cmbx. Queueing of messages is FIFO ordered only, so TA_MPRI (in pk_cmbx->mbxatr) is
not supported.
Error checking
The
following
conditions
are
only
checked
for,
and
only
return
errors
if
CYGSEM_UITRON_BAD_PARAMS_RETURN_ERRORS
is enabled:
•
invalid object id; less than 1 or greater than
CYGNUM_UITRON_TASKS/SEMAS/MBOXES
as appropriate returns
E_ID
374