Table of Contents

ReplySmallMsg

Sends a reply to a small message.

Synopsis

Err ReplySmallMsg( Item msg, int32 result, uint32 val1, uint32val2)

Description

This procedure sends a reply to a small message. (To reply to a standard or buffered message, use ReplyMsg().)

This procedure is identical to ReplyMsg() except that arguments are cast as (uint32) instead of (void *) and (int32). A small message can return only eight bytes of data: four that you provide in the val1 argument, and four that you provide in the val2 argument.

When replying to a message, send back the same message item you received. (Think of this as sending a reply in the same envelope as the original letter.) You can include an optional result code (which you provide in the result argument). Note that no standard result codes are currently defined; the result code must be a value whose meaning is agreed upon by the sending and receiving tasks. For consistency, use negative numbers for errors.

Arguments

Return Value

The procedure returns 0 if the reply was sent successfully or an error code if there was an error.

Implementation

SWI implemented in kernel folio V20.

Associated Files

See Also

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