osClearMailbox function
Declaration:
BOOL osClearMailbox(
  HANDLE Handle
);
Parameters:
Handle

The handle to the mailbox object.

Return value:

TRUE on success; FALSE on failure. Call the osGetLastError function to retrieve extended error information.

Description:

This function removes all messages from the specified mailbox. Each message stored within the mailbox has an allocated memory buffer. When this function is executed, all messages are cleared, and the mailbox is returned to an empty state for further use. During this process, the task calling osClearMailbox is responsible for releasing each associated memory buffer back to the system.

This function is available only when both the OS_USE_MAILBOX and OS_MBOX_CLEAR_FUNC constants are set to 1. For more information regarding mailbox functionality, refer to the mailbox objects section.

Version:1.0
Header file:OS_Mailbox.h (include OS_API.h)
See also: BOOL, FALSE, HANDLE, mailboxes, OS_MBOX_CLEAR_FUNC, OS_USE_MAILBOX, osGetLastError, TRUE
SpaceShadow documentation