Training
×

Low Level Mailboxes

knCreateRtMailbox creates a low-level mailbox with the given specifications. Size must be KN_MAILBOX_SIZE + (cbMessageSize + KN_MAILBOX_MSG_OVERHEAD) * dwQueueLength. Optionally a slot can be reserved for a single priority message.
knDeleteRtMailbox deletes the low-level mailbox associated with the given kernel handle. All threads waiting at the mailbox are awakened and given an E_NONEXIST exception code, and all messages queued at the mailbox are lost. After this call, the memory assigned to the mailbox is available for reuse.
knSendRtData sends a data message to the given low-level mailbox; this fails if the mailbox queue is full.
knSendRtPriorityData sends high-priority data to a low-level mailbox, bypassing the queue. There is only space for one high-priority message in the mailbox so, if this is full, an error status results. Note that there is no INtime equivalent for this function.
knWaitForRtData requests a message from a specific mailbox. If a high-priority message is present, that is the message returned, otherwise the message at the head of the queue is returned. If no message is present, the calling thread is put to sleep for the number of system timer ticks specified.