RTEMS Logo

RTEMS 4.7.0 On-Line Library


Message Buffer Manager psnd_mbf - Poll and Send Message to Message Buffer

PREV UP NEXT Bookshelf RTEMS ITRON 3.0 API User's Guide

6.4.4: psnd_mbf - Poll and Send Message to Message Buffer

CALLING SEQUENCE:

ER ercd =psnd_mbf(
  ID mbfid,
  VP msg,
  INT msgsz
);

STATUS CODES:

E_OK - Normal Completion

E_ID - Invalid ID number (mbfid was invalid or could not be used)

E_NOEXS - Object does not exist (the message buffer specified by mbfid does not exist)

E_OACV - Object access violation (A mbfid less than -4 was specified from a user task. This is implementation dependent.)

E_PAR - Parameter error (msgsz is 0 or less; msgsz is larger than maxmsz; values unsuitable for msg; tmout is -2 or less)

E_DLT - The object being waited for was deleted (the message buffer of interest was deleted while waiting)

E_RLWAI - WAIT state was forcibly released (rel_wai was received while waiting)

E_TMOUT - Polling failure or timeout

E_CTX - Context error (issued from task-independent portions or a task in dispatch disabled state; implementation dependent for psnd_mbf and tsnd_mbf(tmout=TMO_POL))

EN_OBJNO - An object number which could not be accessed on the target node is specified.

EN_CTXID - Specified an object on another node when the system call was issued from a task in dispatch disabled state or from a task-independent portion (implementation-dependent; applicable to psnd_mbf and tsnd_mbf (tmout=TMO_POL) only)

EN_PAR - A value outside the range supported by the target node and/or transmission packet format was specified as a parameter (a value outside supported range was specified for msgsz and/or tmout)

DESCRIPTION:

This routine has the same function as snd_mbf except for the waiting feature. Psnd_mbf polls whether or not the task should wait if snd_mbf is executed. The meaning of parameters to psnd_mbf are the same as for snd_mbf. The specific operations by psnd_mbf are as follows.

- If there is enough space in the buffer, processing is the same as snd_mbf: the message is sent and the system call completes normally.

- If there is not enough space in the buffer, an E_TMOUT error is returned to indicate polling failed and the system call finishes. Unlike snd_mbf, the issuing task does not wait in this case. The status of the message buffer and the message queue remain unchanged.

NOTES:

Multiprocessing is not supported. Thus none of the "EN_" status codes will be returned.


PREV UP NEXT Bookshelf RTEMS ITRON 3.0 API User's Guide

Copyright © 1988-2004 OAR Corporation