.\" Extracted by src2man from /build/rpma-11eW7Q/rpma-1.3.0/src/include/librpma.h .\" Text automatically generated by txt2man .TH rpma_cq_get_fd 3 "29 May 2023" "RPMA" "RPMA Programmer's Manual" .SH NAME \fBrpma_cq_get_fd \fP- get the completion queue's file descriptor .SH SYNOPSIS .nf .fam C #include struct rpma_cq; int \fBrpma_cq_get_fd\fP(const struct rpma_cq *cq, int *fd); .fam T .fi .fam T .fi .SH DESCRIPTION \fBrpma_cq_get_fd\fP() gets the file descriptor of the completion queue (CQ in short). When a next completion in the CQ is ready to be consumed by \fBrpma_cq_get_wc\fP(3), the notification is delivered via the file descriptor. The default mode of the file descriptor is blocking but it can be changed to non-blocking mode using \fBfcntl\fP(2). The CQ is either the connection's main CQ or the receive CQ or CQ of shared RQ, please see \fBrpma_conn_get_cq\fP(3), \fBrpma_conn_get_rcq\fP(3) or \fBrpma_srq_get_rcq\fP() for details. .PP Note after spotting the notification using the provided file descriptor you do not have to call \fBrpma_cq_wait\fP(3) before consuming the completion but it may cause that the next call to \fBrpma_cq_wait\fP(3) will notify you of already consumed completion. .SH RETURN VALUE The \fBrpma_cq_get_fd\fP() function returns 0 on success or a negative error code on failure. \fBrpma_cq_get_fd\fP() does not set *fd value on failure. .SH ERRORS \fBrpma_cq_get_fd\fP() can fail with the following error: .IP \(bu 3 RPMA_E_INVAL - cq or fd is NULL .SH SEE ALSO \fBfcntl\fP(2), \fBrpma_conn_get_cq\fP(3), \fBrpma_conn_get_rcq\fP(3), \fBrpma_srq_get_rcq\fP(3), \fBrpma_cq_wait\fP(3), \fBrpma_cq_get_wc\fP(3), \fBlibrpma\fP(7) and https://pmem.io/rpma/