.\" Extracted by src2man from /build/rpma-U2S8XW/rpma-0.10.0/src/include/librpma.h .\" Text automatically generated by txt2man .TH rpma_conn_completion_wait 3 "26 January 2022" "RPMA" "RPMA Programmer's Manual" .SH NAME \fBrpma_conn_completion_wait \fP- wait for a completion (deprecated) .SH SYNOPSIS .nf .fam C #include struct rpma_conn; int \fBrpma_conn_completion_wait\fP(struct rpma_conn *conn); .fam T .fi .fam T .fi .SH DESCRIPTION \fBrpma_conn_completion_wait\fP() waits for an incoming completion. If it succeeds the completion can be collected using \fBrpma_conn_completion_get\fP(). .SH RETURN VALUE The \fBrpma_conn_completion_wait\fP() function returns 0 on success or a negative error code on failure. .SH ERRORS \fBrpma_conn_completion_wait\fP() can fail with the following errors: .IP \(bu 3 RPMA_E_INVAL - conn is NULL .IP \(bu 3 RPMA_E_PROVIDER - \fBibv_req_notify_cq\fP(3) failed with a provider error .IP \(bu 3 RPMA_E_NO_COMPLETION - no completions available .SH DEPRECATED This is an example snippet of code using the old API: .PP .nf .fam C ret = rpma_conn_completion_wait(conn); if (ret) { error_handling_code() } ret = rpma_conn_completion_get(conn); .fam T .fi The above snippet should be replaced with the following one using the new API: .PP .nf .fam C struct rpma_cq *cq = NULL; ret = rpma_conn_get_cq(cq); if (ret) { error_handling_code() } ret = rpma_cq_wait(cq); if (ret) { error_handling_code() } ret = rpma_cq_get_completion(cq); .fam T .fi .SH SEE ALSO \fBrpma_conn_get_completion_fd\fP(3), \fBrpma_conn_completion_get\fP(3), \fBrpma_conn_req_connect\fP(3), \fBlibrpma\fP(7) and https://pmem.io/rpma/