Next: , Previous: , Up: Message specifications   [Contents][Index]


Buffer control

Buffer control

The coNCePTuaL run-time library allocates a unique message buffer for each message sent/received with the UNIQUE keyword (see Unique messages). The message buffers for NONUNIQUE messages are recycled subject to the constraint that no two concurrent transmissions will reference the same buffer. For example, if a task performs a synchronous send followed by a synchronous receive, those operations must be executed serially and will therefore share a message buffer. If, instead, a task performs an asynchronous send followed by an asynchronous receive, those operations may overlap, so coNCePTuaL will use different message buffers for the two operations.

Message specifications enable the programmer to override the default buffer-allocation behavior. If a message is sent FROM BUFFER <expr> or received INTO BUFFER <expr>, the message is guaranteed to be sent/received using the specified buffer number. For example, FROM BUFFER and INTO BUFFER can be used to force a synchronous send and synchronous receive to use different buffers or an asynchronous send and asynchronous receive to use the same buffer. If <expr> is negative, the behavior is the same as if FROM BUFFER/ INTO BUFFER was not specified. FROM THE DEFAULT BUFFER and INTO THE DEFAULT BUFFER also explicitly specify the default buffer-allocation behavior.

It is also possible to specify byte offsets into a buffer. For example, a message sent ‘FROM 4 WORDS INTO BUFFER 3’ will be sent from 4 words (12 bytes) past buffer 3’s normal starting memory address.


Next: , Previous: , Up: Message specifications   [Contents][Index]

Scott Pakin, pakin@lanl.gov