Commit 93da28f4 authored by Matthieu Dorier's avatar Matthieu Dorier Committed by Philip Carns

Implemented opaque margo_request

parent 7a28816c
......@@ -31,10 +31,10 @@ extern "C" {
struct margo_instance;
typedef struct margo_instance* margo_instance_id;
typedef struct margo_data* margo_data_ptr;
typedef ABT_eventual margo_request;
typedef struct margo_request_struct* margo_request;
#define MARGO_INSTANCE_NULL ((margo_instance_id)NULL)
#define MARGO_REQUEST_NULL ABT_EVENTUAL_NULL
#define MARGO_REQUEST_NULL ((margo_request)NULL)
#define MARGO_CLIENT_MODE 0
#define MARGO_SERVER_MODE 1
#define MARGO_DEFAULT_PROVIDER_ID 0
......@@ -536,6 +536,41 @@ hg_return_t margo_provider_iforward(
#define margo_iforward(__handle, __in_struct, __req)\
margo_provider_iforward(MARGO_DEFAULT_PROVIDER_ID, __handle, __in_struct, __req)
/**
* Forward an RPC request to a remote provider with a user-defined timeout
* @param [in] provider_id provider id
* @param [in] handle identifier for the RPC to be sent
* @param [in] in_struct input argument struct for RPC
* @param [in] timeout_ms timeout in milliseconds
* @returns 0 on success, hg_return_t values on error
*/
hg_return_t margo_provider_forward_timed(
uint16_t provider_id,
hg_handle_t handle,
void *in_struct,
double timeout_ms);
#define margo_forward_timed(__handle, __in_struct, __timeout)\
margo_provider_forward_timed(MARGO_DEFAULT_PROVIDER_ID, __handle, __in_struct, __timeout)
/**
* Non-blocking version of margo_provider_forward_timed.
* @param [in] provider_id provider id
* @param [in] handle identifier for the RPC to be sent
* @param [in] in_struct input argument struct for RPC
* @param [in] timeout_ms timeout in milliseconds
* @returns 0 on success, hg_return_t values on error
*/
hg_return_t margo_provider_iforward_timed(
uint16_t provider_id,
hg_handle_t handle,
void *in_struct,
double timeout_ms,
margo_request* req);
#define margo_iforward_timed(__handle, __in_struct, __timeout, __req)\
margo_provider_forward_timed(MARGO_DEFAULT_PROVIDER_ID, __handle, __in_struct, __timeout, __req)
/**
* Wait for an operation initiated by a non-blocking
* margo function (margo_iforward, margo_irespond, etc.)
......@@ -558,18 +593,6 @@ hg_return_t margo_wait(
*/
int margo_test(margo_request req, int* flag);
/**
* Forward an RPC request to a remote host with a user-defined timeout
* @param [in] handle identifier for the RPC to be sent
* @param [in] in_struct input argument struct for RPC
* @param [in] timeout_ms timeout in milliseconds
* @returns 0 on success, hg_return_t values on error
*/
hg_return_t margo_forward_timed(
hg_handle_t handle,
void *in_struct,
double timeout_ms);
/**
* Send an RPC response, waiting for completion before returning
* control to the calling ULT.
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment