Err SendMsg( Item mp, Item msg, const void *dataptr, int32 datasize )
SendSmallMsg()
. The message is queued on the message port's list of messages according to its priority. Messages that have the same priority are queued on first come, first served basis.
Whether a message is standard or buffered is determined by the procedure you use to create the message: CreateMsg()
creates a standard message (one whose message data belongs to the sending task; the receiving task reads from this block), while CreateBufferedMsg creates a buffered message (one in which a buffer for the message data is included in the message). For standard messages, the dataptr and datasize arguments refer to the data block owned by the message sender. For buffered messages, the dataptr and datasize arguments specify the data to be copied into the message's internal buffer before the message is sent.
If the message is a buffered message, SendMsg()
checks the size of the data block to see whether it will fit in the message's buffer. If it won't fit, SendMsg()
returns an error.
GetMsg
(), GetThisMsg(), ReplyMsg(), ReplySmallMsg(), SendSmallMsg(), WaitPort()