Sends a high-priority data message to the given low-level mailbox and places it at the head of the queue.
BOOLEAN knSendRtPriorityData( KNHANDLE hMailbox, // handle for low-level mailbox LPVOID lpData, // pointer to data message DWORD cbBytesSent // number of bytes in message );
hMailbox
lpData
cbBytesSent
If a task is waiting at the mailbox, it receives the message; otherwise, the message is queued. If the mailbox is full, then an error is returned.
Mailboxes normally store messages in a FIFO queue. A series of knSendRtPriorityData calls results in messages queued in LIFO order.
When you create a low-level mailbox with knCreateRtMailbox, you can specify one of the slots in its queue as reserved for a high-priority message. knSendRtPriorityData can then use that slot.
Note: If you use this call from an interrupt handler, use knStopRtScheduler before making the call.
TRUE
FALSE
E_OK
E_KN_LIMIT_EXCEEDED
Versions | Defined in | Include | Link to |
---|---|---|---|
INtime 3.0 | intime/rt/include/rtbase.h | rt.h | rt.lib |