Cyg_Mbox::Cyg_Mbox
Name: Cyg_Mbox::Cyg_Mbox ( ) - create a message box
Synopsis:
Cyg_Mbox::Cyg_Mbox
(
  void
)
Description: This creates a message box. Message boxes are of fixed depth. The depth of the message box is controlled by the compilation of the kernel. Most often the depth is 10.
Include: #include <cyg/kernel/mbox.hxx>
Returns: nothing
See Also: Cyg_Mbox::~Cyg_Mbox

Cyg_Mbox::~Cyg_Mbox
Name: Cyg_Mbox::~Cyg_Mbox ( ) - destroy a message box
Synopsis:
Cyg_Mbox::~Cyg_Mbox
(
  void
)
Description: This destroys a message box. Be sure that no threads are using a message box before destroying it.
Include: #include <cyg/kernel/mbox.hxx>
Returns: nothing
See Also: Cyg_Mbox::Cyg_Mbox

Cyg_Mbox::get
Name: Cyg_Mbox::get ( ) - get a message from a message box
Synopsis:
void * Cyg_Mbox::get
(
  void
)
Description: Retrieves a message from a message box. If the message box is empty this will block until a message is added.
Include: #include <cyg/kernel/mbox.hxx>
Returns: a pointer to the oldest message placed in the message box.
See Also: Cyg_Mbox::tryget, Cyg_Mbox::peek_item, Cyg_Mbox::put, Cyg_Mbox::tryput, Cyg_Mbox::peek

Cyg_Mbox::get
Name: Cyg_Mbox::get ( ) - get a message from a message box with timeout
Synopsis:
void * Cyg_Mbox::get
(
  cyg_tick_count absolute_time /* max tick count before timeout */
)
Description: Retrieves a message from a message box. If the message box is empty this will block until a message is added or the system tick reaches "absolute_time".
Include: #include <cyg/kernel/mbox.hxx>
Returns: a pointer to the oldest message placed in the message box or a NULL pointer if the wait timed out.
See Also: Cyg_Mbox::tryget, Cyg_Mbox::peek_item, Cyg_Mbox::put, Cyg_Mbox::tryput, Cyg_Mbox::peek

Cyg_Mbox::tryget
Name: Cyg_Mbox::tryget ( ) - get a message from a message box if one is available
Synopsis:
void * Cyg_Mbox::tryget
(
  void
)
Description: Retrieves a message from a message box is a message is available. If the message box is empty, this will return immediately with an error.
Include: #include <cyg/kernel/mbox.hxx>
Returns: a pointer to the oldest message placed in the message box or a NULL pointer if the message box is empty.
See Also: Cyg_Mbox::get, Cyg_Mbox::peek_item, Cyg_Mbox::put, Cyg_Mbox::tryput, Cyg_Mbox::peek

Cyg_Mbox::peek_item
Name: Cyg_Mbox::peek_item ( ) - get a message from an mbox but don't remove from queue
Synopsis:
void * Cyg_Mbox::peek_item
(
  void
)
Description: Retrieves the address of the oldest message in a message box but does not remove the message from the message box. This will not block, if the message box is emtpy NULL is returned.
Include: #include <cyg/kernel/mbox.hxx>
Returns: a pointer to the oldest message placed in the message box or a NULL pointer if the message box is empty.
See Also: Cyg_Mbox::get, Cyg_Mbox::tryget, Cyg_Mbox::put, Cyg_Mbox::tryput, Cyg_Mbox::peek

Cyg_Mbox::put
Name: Cyg_Mbox::put ( ) - place a message into a message box
Synopsis:
cyg_bool Cyg_Mbox::put
(
  void *item /* item to place into message box */
)
Description: Places a new message in a message box. If the message box is full the thread will be blocked until the the message can be placed into the message box.
Include: #include <cyg/kernel/mbox.hxx>
Returns: "true" if the message was placed into the message box, "false" otherwise.
See Also: Cyg_Mbox::get, Cyg_Mbox::tryget, Cyg_Mbox::peek_item, Cyg_Mbox::tryput, Cyg_Mbox::peek

Cyg_Mbox::put
Name: Cyg_Mbox::put ( ) - place a message into a message box with a timeout
Synopsis:
cyg_bool Cyg_Mbox::put
(
  void           *item,        /* item to place into message box */
  cyg_tick_count absolute_time /* max tick count before timeout  */
)
Description: Places a new message in a message box. If the message box is full the thread will be blocked until the the message can be placed into the message box or the system time reaches "absolute_time".
Include: #include <cyg/kernel/mbox.hxx>
Returns: "true" if the message was placed into the message box, "false" otherwise.
See Also: Cyg_Mbox::get, Cyg_Mbox::tryget, Cyg_Mbox::peek_item, Cyg_Mbox::tryput, Cyg_Mbox::peek

Cyg_Mbox::tryput
Name: Cyg_Mbox::tryput ( ) - place a message into a message box if space is available
Synopsis:
cyg_bool Cyg_Mbox::tryput
(
  void *item /* item to place into message box */
)
Description: Places a new message in a message box. If the message box is full the message will not be placed in the message box and the function will return with an error status.
Include: #include <cyg/kernel/mbox.hxx>
Returns: "true" if the message was placed into the message box, "false" otherwise.
See Also: Cyg_Mbox::get, Cyg_Mbox::tryget, Cyg_Mbox::peek_item, Cyg_Mbox::put, Cyg_Mbox::peek

Cyg_Mbox::peek
Name: Cyg_Mbox::peek ( ) - gets the number of messages currently in the message queue
Synopsis:
cyg_count32 Cyg_Mbox::peek
(
  void
)
Description: This reports the number of messages currently in the message queue waiting to be processed.
Include: #include <cyg/kernel/mbox.hxx>
Returns: the number of messages currently in the message queue.
See Also: Cyg_Mbox::get, Cyg_Mbox::tryget, Cyg_Mbox::peek_item, Cyg_Mbox::put, Cyg_Mbox::tryput

Cyg_Mbox::waiting_to_get
Name: Cyg_Mbox::waiting_to_get ( ) - reports if any threads are waiting to get a message from this mbox
Synopsis:
cyg_bool Cyg_Mbox::waiting_to_get
(
  void
)
Description: This reports whether any threads are being blocked waiting to get a message from this message box.
Include: #include <cyg/kernel/mbox.hxx>
Returns: "true" if any threads are waiting for a message, "false" is no threads are waiting for a message from the queue.
See Also: Cyg_Mbox::waiting_to_put

Cyg_Mbox::waiting_to_put
Name: Cyg_Mbox::waiting_to_put ( ) - reports if any threads are waiting to place a message into this mbox
Synopsis:
cyg_bool Cyg_Mbox::waiting_to_put
(
  void
)
Description: This reports whether any threads are being blocked waiting to place a message into this message box.
Include: #include <cyg/kernel/mbox.hxx>
Returns: "true" if any threads are waiting to place a message into this message box, "false" is no threads are waiting to place a message into this message box.
See Also: Cyg_Mbox::waiting_to_get