Creates a buffered message.
Item CreateBufferedMsg( const char *name, uint8 pri, Item mp,uint32 datasize )
One of the ways tasks communicate is by sending messages to each other. This procedure creates an item for a buffered message (a message that includes an internal buffer for sending data to the receiving task). You can use this procedure in place of CreateItem()
to create the message.
The procedure returns the item number of the message or an error code if an error occurs.
Convenience call implemented in clib.lib V20.
The advantage of using a buffered message instead of a standard message is that the sending task doesn't need to keep the data block containing the message data after the message is sent. All the necessary data is included in the message.
The same message item can be resent any number of times. When you are finished with a message item, use DeleteMsg()
to delete it.
You can use FindNamedItem()
to find a message item by name. When creating messages, you should assign unique names whenever possible.
The priority value (set with the pri argument) is not used consistently.
CreateMsg
(), CreateMsgPort(), CreateSmallMsg(), DeleteMsg(), DeleteMsgPort(), SendMsg()