static hg_return_t hg_test_perf_forward_cb(const struct hg_cb_info *callback_info) { hg_request_complete((hg_request_t *) callback_info->arg); return HG_SUCCESS; }
static hg_return_t hg_test_bulk_forward_cb(const struct hg_cb_info *callback_info) { hg_handle_t handle = callback_info->info.forward.handle; hg_request_t *request = (hg_request_t *) callback_info->arg; size_t bulk_write_ret = 0; bulk_write_out_t bulk_write_out_struct; hg_return_t ret = HG_SUCCESS; /* Get output */ ret = HG_Get_output(handle, &bulk_write_out_struct); if (ret != HG_SUCCESS) { fprintf(stderr, "Could not get output\n"); goto done; } /* Get output parameters */ bulk_write_ret = bulk_write_out_struct.ret; printf("bulk_write returned: %zu\n", bulk_write_ret); /* Free request */ ret = HG_Free_output(handle, &bulk_write_out_struct); if (ret != HG_SUCCESS) { fprintf(stderr, "Could not free output\n"); goto done; } hg_request_complete(request); done: return ret; }
static hg_return_t hg_test_rpc_forward_cb(const struct hg_cb_info *callback_info) { hg_handle_t handle = callback_info->handle; hg_request_t *request = (hg_request_t *) callback_info->arg; int rpc_open_ret; int rpc_open_event_id; rpc_open_out_t rpc_open_out_struct; hg_return_t ret = HG_SUCCESS; /* Get output */ ret = HG_Get_output(handle, &rpc_open_out_struct); if (ret != HG_SUCCESS) { fprintf(stderr, "Could not get output\n"); goto done; } /* Get output parameters */ rpc_open_ret = rpc_open_out_struct.ret; rpc_open_event_id = rpc_open_out_struct.event_id; printf("rpc_open returned: %d with event_id: %d\n", rpc_open_ret, rpc_open_event_id); /* Free request */ ret = HG_Free_output(handle, &rpc_open_out_struct); if (ret != HG_SUCCESS) { fprintf(stderr, "Could not free output\n"); goto done; } hg_request_complete(request); done: return ret; }
/*---------------------------------------------------------------------------*/ static NA_INLINE int na_test_recv_expected_cb(const struct na_cb_info *na_cb_info) { hg_request_t *request = (hg_request_t *) na_cb_info->arg; hg_request_complete(request); return NA_SUCCESS; }
static hg_return_t hg_test_rpc_forward_cb(const struct hg_cb_info *callback_info) { hg_request_t *request = (hg_request_t *) callback_info->arg; hg_return_t ret = HG_SUCCESS; hg_request_complete(request); return ret; }
/*---------------------------------------------------------------------------*/ static hg_return_t hg_test_finalize_rpc_cb(const struct hg_cb_info *callback_info) { hg_request_t *request_object = (hg_request_t *) callback_info->arg; hg_request_complete(request_object); return HG_SUCCESS; }
/*---------------------------------------------------------------------------*/ static NA_INLINE int na_test_target_lookup_cb(const struct na_cb_info *na_cb_info) { struct na_test_target_lookup_arg *na_test_target_lookup_arg = (struct na_test_target_lookup_arg *) na_cb_info->arg; *na_test_target_lookup_arg->addr_ptr = na_cb_info->info.lookup.addr; hg_request_complete(na_test_target_lookup_arg->request); return NA_SUCCESS; }
static hg_return_t hg_test_perf_forward_cb(const struct hg_cb_info *callback_info) { struct hg_test_perf_args *args = (struct hg_test_perf_args *) callback_info->arg; if ((unsigned int) hg_atomic_incr32(&args->op_completed_count) == args->op_count) { hg_request_complete(args->request); } return HG_SUCCESS; }
/*---------------------------------------------------------------------------*/ static hg_return_t hg_test_drc_token_request_cb(const struct hg_cb_info *callback_info) { hg_request_t *request = (hg_request_t *) callback_info->arg; hg_return_t ret = HG_SUCCESS; if (callback_info->ret != HG_SUCCESS) { HG_LOG_ERROR("Return from callback info is not HG_SUCCESS"); goto done; } done: hg_request_complete(request); return ret; }
static hg_return_t hg_test_rpc_forward_cb(const struct hg_cb_info *callback_info) { hg_handle_t handle = callback_info->info.forward.handle; hg_request_t *request = (hg_request_t *) callback_info->arg; int rpc_open_ret; int rpc_open_event_id; rpc_open_out_t rpc_open_out_struct; hg_return_t ret = HG_SUCCESS; if (callback_info->ret != HG_CANCELED) { fprintf(stderr, "Error: HG_Forward() was not canceled: %d\n", callback_info->ret); /* Get output */ ret = HG_Get_output(handle, &rpc_open_out_struct); if (ret != HG_SUCCESS) { fprintf(stderr, "Could not get output\n"); goto done; } /* Get output parameters */ rpc_open_ret = rpc_open_out_struct.ret; rpc_open_event_id = rpc_open_out_struct.event_id; printf("rpc_open returned: %d with event_id: %d\n", rpc_open_ret, rpc_open_event_id); /* Free request */ ret = HG_Free_output(handle, &rpc_open_out_struct); if (ret != HG_SUCCESS) { fprintf(stderr, "Could not free output\n"); goto done; } } else { printf("HG_Forward() was successfully canceled\n"); } hg_request_complete(request); done: return ret; }
/*---------------------------------------------------------------------------*/ static hg_return_t hg_test_rpc_forward_cb(const struct hg_cb_info *callback_info) { hg_handle_t handle = callback_info->info.forward.handle; hg_request_t *request = (hg_request_t *) callback_info->arg; overflow_out_t out_struct; hg_string_t string; size_t string_len; hg_return_t ret = HG_SUCCESS; if (callback_info->ret != HG_SUCCESS) { HG_TEST_LOG_WARNING("Return from callback info is not HG_SUCCESS"); goto done; } /* Get output */ ret = HG_Get_output(handle, &out_struct); if (ret != HG_SUCCESS) { HG_TEST_LOG_ERROR("Could not get output"); goto done; } /* Get output parameters */ string = out_struct.string; string_len = out_struct.string_len; HG_TEST_LOG_DEBUG("Returned string (length %zu): %s", string_len, string); (void) string; (void) string_len; /* Free request */ ret = HG_Free_output(handle, &out_struct); if (ret != HG_SUCCESS) { HG_TEST_LOG_ERROR("Could not free output"); goto done; } done: hg_request_complete(request); return ret; }