Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

Commit

Permalink
examples: use new APIs on 11-write-with-imm
Browse files Browse the repository at this point in the history
Signed-off-by: Xiao Yang <[email protected]>
  • Loading branch information
yangx-jy committed Sep 10, 2021
1 parent 5c9a88a commit d569a2d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
10 changes: 8 additions & 2 deletions examples/11-write-with-imm/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,18 @@ main(int argc, char *argv[])
if (ret)
goto err_mr_remote_delete;

/* get the connection's main CQ */
struct rpma_cq *cq = NULL;
ret = rpma_conn_get_cq(conn, &cq);
if (ret)
goto err_mr_remote_delete;

/* prepare completions, get one and validate it */
ret = rpma_conn_completion_wait(conn);
ret = rpma_cq_wait(cq);
if (ret)
goto err_mr_remote_delete;

ret = rpma_conn_completion_get(conn, &cmpl);
ret = rpma_cq_get_completion(cq, &cmpl);
if (ret)
goto err_mr_remote_delete;

Expand Down
10 changes: 8 additions & 2 deletions examples/11-write-with-imm/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,18 @@ main(int argc, char *argv[])
goto err_conn_disconnect;
}

/* get the connection's main CQ */
struct rpma_cq *cq = NULL;
ret = rpma_conn_get_cq(conn, &cq);
if (ret)
goto err_conn_disconnect;

/* prepare completions, get one and validate it */
ret = rpma_conn_completion_wait(conn);
ret = rpma_cq_wait(cq);
if (ret)
goto err_conn_disconnect;

ret = rpma_conn_completion_get(conn, &cmpl);
ret = rpma_cq_get_completion(cq, &cmpl);
if (ret)
goto err_conn_disconnect;

Expand Down

0 comments on commit d569a2d

Please sign in to comment.