CreateSmallMsg

Creates a small message.

Synopsis

Item CreateSmallMsg( const char *name, uint8 pri, Item mp )

Description

This convenience procedure creates the item for a small message (a message that can contain up to eight bytes of data). You can use this procedure in place of CreateItem() to create the item.

To create a standard message (a message in which any data to be communicated to the receiving task is contained in a data block allocated by the sending task), use CreateMsg(). To create a buffered message (a message that includes an internal buffer for sending data to the receiving task), use CreateBufferedMsg().

Arguments

name
The name of the message (see "Notes").
pri
The priority of the message. This determines the position of the message in the receiving task's message queue and thus, how soon it is likely to be handled. A larger number specifies a higher priority.
mp
The item number of the message port for the return message.

Return Value

The procedure returns the item number of the message that was created or an error code if an error occurs.

Implementation

Convenience call implemented in clib.lib V20.

Associated Files

msgport.h
ANSI C Prototype
clib.lib
ARM Link Library

Notes

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 by name. When naming messages, you should assign unique names whenever possible.

See Also

CreateMsg(), CreateMsgPort(), CreateBufferedMsg(), DeleteMsg(), DeleteMsgPort(), SendMsg()