osOpenMailbox function
Declaration:
HANDLE osOpenMailbox(
  SYSNAME Name
);
Parameters:
Name

Name of the mailbox object.

Return value:

The return value is a handle to the opened mailbox object when success or NULL_HANDLE on failure. Use osGetLastError function to obtain extended error information.

Description:

Function opens existing mailbox object.

Mailboxes are very similar to queues. They enable to exchange data between tasks and are based on FIFO (First In, First Out). The main differences between mailbox and queue are that the message size and the number of messages are not limited, so depend only on the available memory resources.

During mailbox creation, an optional mailbox name may be specified. It makes tasks able to open it by osOpenMailbox function. The non-used mailbox should be closed with the osCloseHandle. Mailbox will be deleted when it is closed by all tasks that opened it. More information you can find in the system objects managementsection.

If all of the osOpen* functions are not used, the system ignores an object name and the code used to name management will be removed. It will reduce final size of the output code. For more information about the names and object opening see the system objects managementsection.

For more information about the mailbox see the mailbox objects section.

Function is available only, when the value of OS_USE_MAILBOX and OS_OPEN_MBOX_FUNC constant is set to 1. If function is not used, set the OS_OPEN_MBOX_FUNC to 0 to reduce the output code.

SpaceShadow documentation