---
name: "rpma_srq_get_rcq"
section: "3"
platform: "linux"
package: "librpma-dev"
version: "1.3.0-2+b3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/rpma_srq_get_rcq"
---

# rpma\_srq\_get\_rcq(3)

## NAME

**rpma\_srq\_get\_rcq -- get the receive CQ from the shared RQ object**

## SYNOPSIS

```
      #include <librpma.h>
      struct rpma_srq;
      struct rpma_cq;
      int rpma_srq_get_rcq(const struct rpma_srq *srq, struct rpma_cq **rcq_ptr);
```

## DESCRIPTION

**rpma\_srq\_get\_rcq() gets the receive CQ from the shared RQ object. The receive CQ created by** **[rpma\_srq\_new(3)](/rpma_srq_new/3.md) allows handling all [rpma\_srq\_recv(3)](/rpma_srq_recv/3.md) completions within the shared RQ.** **[rpma\_srq\_cfg\_set\_rcq\_size(3)](/rpma_srq_cfg_set_rcq_size/3.md) can change the receive CQ size.**

## RETURN VALUE

**The rpma\_srq\_get\_rcq() function returns 0 on success or a negative error code on failure.** **rpma\_srq\_get\_rcq() does not set \*rcq\_ptr value on failure.**

## ERRORS

**rpma\_srq\_get\_rcq() can fail with the following error:**

- •

  **RPMA\_E\_INVAL - srq or rcq\_ptr is NULL**

## SEE ALSO

**[rpma\_cq\_wait(3)](/rpma_cq_wait/3.md), [rpma\_cq\_get\_wc(3)](/rpma_cq_get_wc/3.md), [rpma\_cq\_get\_fd(3)](/rpma_cq_get_fd/3.md), [rpma\_srq\_cfg\_set\_rcq\_size(3)](/rpma_srq_cfg_set_rcq_size/3.md),** **[rpma\_srq\_new(3)](/rpma_srq_new/3.md), [librpma(7)](/librpma/7.md) and https://pmem.io/rpma/**
