11 #ifndef MERCURY_REQUEST_H
12 #define MERCURY_REQUEST_H
14 #include "mercury_util_config.h"
46 unsigned int *flag,
void *arg);
134 unsigned int timeout,
unsigned int *flag);
154 HG_UTIL_EXPORT
void *
struct hg_request_class hg_request_class_t
Purpose: define a request emulation library on top of the callback model that uses progress/trigger f...
HG_UTIL_EXPORT int hg_request_wait(hg_request_object_t *request, unsigned int timeout, unsigned int *flag)
Wait timeout ms for the specified request to complete.
HG_UTIL_EXPORT hg_request_object_t * hg_request_create(hg_request_class_t *request_class)
Create a new request from a specified request class.
HG_UTIL_EXPORT void * hg_request_get_data(hg_request_object_t *request)
Get user data from a specified request.
HG_UTIL_EXPORT int hg_request_set_data(hg_request_object_t *request, void *data)
Attach user data to a specified request.
HG_UTIL_EXPORT int hg_request_finalize(hg_request_class_t *request_class)
Finalize the request class.
int(* hg_request_trigger_func_t)(unsigned int timeout, unsigned int *flag, void *arg)
Trigger callback, arg can be used to pass extra parameters required by underlying API...
HG_UTIL_EXPORT int hg_request_destroy(hg_request_object_t *request)
Destroy the request, freeing the resources.
HG_UTIL_EXPORT int hg_request_waitall(int count, hg_request_object_t *request[], unsigned int timeout, unsigned int *flag)
Wait timeout ms for all the specified request to complete.
HG_UTIL_EXPORT int hg_request_complete(hg_request_object_t *request)
Mark the request as completed.
struct hg_request_object hg_request_object_t
HG_UTIL_EXPORT hg_request_class_t * hg_request_init(hg_request_progress_func_t progress, hg_request_trigger_func_t trigger, void *arg)
Initialize the request class with the specific progress/trigger functions that will be called on hg_r...
int(* hg_request_progress_func_t)(unsigned int timeout, void *arg)
Progress callback, arg can be used to pass extra parameters required by underlying API...