# Message

The means of sending data from one task to another.

### Description

Messages are used to communicate amongst tasks. Messages come in three flavors: small, standard, and buffered. The flavors each carry their own type or amount of information. The small message carries exactly eight bytes of data. Standard messages contain a pointer to some data. Buffered messages contain an arbitrary amount of data within them.

Messages are closely associated with message ports. In order to send a message, a task must indicate a destination message port. Essentially, messages shuttle back and forth between message ports, and tasks can get and put messages from and to message ports.

### Folio

kernel

### Item Type

MESSAGENODE

### Create

`CreateMsg(), CreateSmallMsg(), CreateBufferedMsg(), CreateItem()`

### Delete

`DeleteMsg`(), DeleteItem()

### Query

`FindItem`(), FindNamedItem(), FindVersionedItem()

### Use

`ReplyMsg`(), ReplySmallMsg(), SendMsg(), SendSmallMsg(), GetThisMsg(), GetMsg(), WaitPort()

### Tag Arguments

CREATEMSG_TAG_REPLYPORT

(Item) Create. The item number of the message port to use when replying this message. This must be a port that was created by the same task or thread that is creating the message.

CREATEMSG_TAG_MSG_IS_SMALL

Create. When this tag is present, it specifies that this message should be small. This means that this message should be used with `SendSmallMsg()` and `ReplySmallMsg()`, and can only pass 8 bytes of information.

CREATEMSG_TAG_DATA_SIZE

(uint32) Create. When this tag is present, it specifies that the message should be buffered. The argument of this tag specifies the size of the buffer that should be allocated.