rpma_cq_get_fd(3)

rpma_cq_get_fd3

Get the completion queue's file descriptor

Usage

      #include <librpma.h>
      struct rpma_cq;
      int rpma_cq_get_fd(const struct rpma_cq *cq, int *fd);

Overview

rpma_cq_get_fd() gets the file descriptor of the completion queue (CQ in short). When a next completion in the CQ is ready to be consumed by rpma_cq_get_wc(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 fcntl(2). The CQ is either the connection's main CQ or the receive CQ or CQ of shared RQ, please see rpma_conn_get_cq(3), rpma_conn_get_rcq(3) or rpma_srq_get_rcq() for details.

Note after spotting the notification using the provided file descriptor you do not have to call rpma_cq_wait(3) before consuming the completion but it may cause that the next call to rpma_cq_wait(3) will notify you of already consumed completion.

Return value

The rpma_cq_get_fd() function returns 0 on success or a negative error code on failure. rpma_cq_get_fd() does not set *fd value on failure.

Errors

rpma_cq_get_fd() can fail with the following error:

•

RPMA_E_INVAL - cq or fd is NULL

Releases

2 releases since Debian 12 (Bookworm); the text changed 1 time.

  1. 12
  2. 13

From librpma-dev 1.3.0-2+b3 in Debian 13 (Trixie). Parsed by carta from the page's man source.