RTEMS Logo

RTEMS 4.7.99.2 On-Line Library


Message Buffer Manager prcv_mbf - Poll and Receive Message from Message Buffer

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

6.4.7: prcv_mbf - Poll and Receive Message from Message Buffer

CALLING SEQUENCE:

ER ercd =prcv_mbf(
  VP msg,
  INT *p_msgsz,
  ID mbfid
);

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 (values unsuitable for msg; tmout is -2 or less)

E_DLT - The object being waited for was deleted (the specified message buffer 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)

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

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 tmout)

EN_RPAR - A value outside the range supported by the issuing node and/or transmission packet format was returned as a return parameter (msgsz is outside supported range for requesting node)

DESCRIPTION:

The prcv_mbf system call has the same function as rcv_mbf except for the waiting feature. Prcv_mbf polls whether or not the task should wait if rcv_mbf is executed. The meaning of parameters to prcv_mbf are the same as for rcv_mbf. The specific operations by prcv_mbf are as follows.

- If there is a message in the specified message buffer, processing is the same as rcv_mbf: the first message on the message buffer is retrieved and the system call completes normally.

- If there is no message in the specified message buffer, an E_TMOUT error is returned to indicate polling failed and the system call finishes. Unlike rcv_mbf, the issuing task does not wait in this case. The status of the message buffer 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