RTEMS Logo

RTEMS 4.7.99.2 On-Line Library


Message Buffer Manager ref_mbf - Reference Message Buffer Status

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

6.4.9: ref_mbf - Reference Message Buffer Status

CALLING SEQUENCE:

ER ref_mbf(
  T_RMBF *pk_rmbf,
  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 (the packet address for the return parameters could not be used)

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

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

DESCRIPTION:

This system call refers to the state of the message buffer specified by mbfid, and returns information of a task waiting to send a message (stsk), the size of the next message to be received (msgsz), the free buffer size (frbufsz), information of a task waiting to receive a message (wtsk), and its extended information (exinf).

Wtsk and stsk indicate whether or not there is a task waiting for the message buffer in question. If there is no waiting task, wtsk and stsk are returned as FALSE = 0. If there is a waiting task, wtsk and stsk are returned as values other than 0.

An E_NOEXS error will result if the message buffer specified to ref_mbf does not exist.

The size of the message at the head of the message buffer (the next message to be received) is returned to msgsz. If there are no messages on the message buffer, msgsz will be returned as FALSE = 0. A message whose size is zero cannot be sent.

At least one of msgsz = FALSE and wtsk = FALSE is always true in this system call.

Frbufsz indicates the amount of free memory in the message buffer. This value can be used to know the total approximate size of the messages which can be sent to the message buffer.

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