AMS_REPLY

Send a message on a given (path,messid)

Invocation

(void)ams_reply( path, messid, message_function, message_status,
message_context, message_name, message_length, message_value, status )

Arguments

path = int (given)
the path number for communicating with the other task

messid = int (given)

the number identifying the transaction

message_function = int (given)

message function

message_status = int (given)

message status

message_context = int (given)

message context

message_name = char * (given)

message name

message_length = int (given)

length of value

message_value = char * (given)

message value

status = int * (given and returned)

global status

Description:

As part of transaction ’messid’ on path ’path’, the user wishes to send the message AS A REPLY to a previously received message from the other end of the path. The user can ONLY reply with a MESSYS__DE_INIT message (something has gone wrong) or with a normal MESSY__MESSAGE message. Any other value of message_function will result in status MESSYS__MSGFUNC being returned.

A MESSYS__MESSAGE message may be a GSOC_END, terminating a transaction or one of the various other types, MESSYS__INFORM, MESSYS__PARAMREQ etc.

Implementation

We first check that the path is open and that the transaction is in use. If both these are OK we check the ’function’ part of the external form and check exactly what is being sent. If the process ends up sending a GSOC_END message the transaction is also closed at this end.