next up previous 199
Next: About this document ...
Up: Function Descriptions
Previous: AMS_RESMSG - Send a RESCHEDULE message to this task


AMS_SEND - Send a message on a given path

Invocation:
(void)ams_send( path, message_function, message_status,
message_context, message_name, message_length, message_value, messid,
status )

Arguments:

path = int (given)
pointer to the path

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

messid = int * (returned)
message number issued by this task (returned)

status = int * (given and returned)
global status


Description:
This function is used by the application code to send a message to another task on path 'path'.

The expectation is that this is one of a DEINIT message, an INIT message or the first message of a NEW transaction whose transaction number is to be set into '*messid'.


Implementation:
When used for the first message of a transaction, ams_getfreetrans() is used to obtain a free transaction and the MESSYS__MESSAGE is sent to the other task's command queue (using ams_sendgsocstart()).

When used to send an INIT message, ams_getfreetrans() is used to obtain a free temporary transaction and the MESSYS__INIT is sent to the other task's command queue (using ams_sendinit()).

When used to send a DEINIT, ams_senddeinit() is used to send the MESSYS__DE_INIT message to the other task's command queue.




next up previous 199
Next: About this document ...
Up: Function Descriptions
Previous: AMS_RESMSG - Send a RESCHEDULE message to this task

AMS The Unix ADAM Message System
Starlink User Note 241
B D Kelly (ROE)
A J Chipperfield (RAL)
16 August 2001
E-mail:ussc@star.rl.ac.uk

Copyright © 2000 Council for the Central Laboratory of the Research Councils