Unit 'exec' Package
[Overview][Constants][Types][Procedures and functions][Variables][Index] [#os4units]

PutMsg

Put a message to a message port

Declaration

Source position: exec.pas line 1809

procedure PutMsg(

  Port: PMsgPort;

  Message: PMessage

);

Arguments

Port

  

A pointer to a message port

Message

  

A pointer to a message

Description

This function attaches a message to the end of a given message port. It provides a fast, non-copying message sending mechanism.

Messages can be attached to only one port at a time. The message body can be of any size or form. Because messages are not copied, cooperating tasks share the same message memory. The sender task must not recycle the message until it has been replied by the receiver. Of course this depends on the message handling conventions setup by the involved tasks. If the ReplyPort field is non-zero, when the message is replied by the receiver, it will be sent back to that port.

See also

GetMsg

  

Get next message from message port

ReplyMsg

  

Put a message to its reply port


Documentation generated on: 2021-07-30