#include "gm_call_trace.h"
#include "gm_debug.h"
#include "gm_enable_fast_small_send.h"
#include "gm_enable_trace.h"
#include "gm_internal.h"
#include "gm_send_queue.h"
Functions | |
GM_ENTRY_POINT void | gm_send_with_callback (gm_port_t *p, void *message, unsigned int size, gm_size_t len, unsigned int priority, unsigned int target_node_id, unsigned int target_port_id, gm_send_completion_callback_t callback, void *context) |
This file contains the GM API functions gm_send_with_callback().
|
gm_send_with_callback() is a fully asynchronous send. It queues the message of length len to be sent with priority priority to node target_node_id. As GM is event-based, the effective completion of the send is notified to the client software by the execution of the callback function specified by callback. Before calling gm_send_with_callback(), the client software must first possess a send token of the same priority, and by calling gm_send_with_callback() the client implicitly relinquishes this send token. After a call to gm_send_with_callback(..., message, len, ...), the memory specified by message and len must not be modified until the send completes. After the send completes, callback(port,context,status) will be called inside gm_unknown(), with status indicating the status of the completed send. Note: The order of messages with different priorities or with different destination ports is not preserved. Only the order of messages with the same priority and to the same destination port is preserved. In the special case that the target_port_id is the same as the sending port ID (as is often the case), the streamlined gm_send_to_peer_with_callback() function may be used instead of gm_send_with_callback(), allowing the target_port_id parameter to be omitted, and slightly improving small-message performance.
|