rpma_conn_get_cq(3)
π rpma_conn_get_cq β get the connection's main CQ π
okay bestie, welcome to the RPMA Programmer's Manual β¨ this one's short and sweet, like a lil snack, but it's important so pay attention π«Ά
πΈ NAME πΈ
rpma_conn_get_cq β grab the connection's main CQ, no cap π
β¨ SYNOPSIS β¨
#include <librpma.h>
struct rpma_conn;
struct rpma_cq;
int rpma_conn_get_cq(const struct rpma_conn *conn, struct rpma_cq **cq_ptr);
π¦ DESCRIPTION π¦
so like. rpma_conn_get_cq() gets the main CQ from the connection. that's it. that's the whole job. π
but here's the tea on when it matters, bestie, because context is everything:
- when the receive CQ is not present, the main CQ lets you handle all completions within the connection β¨
- when the receive CQ is present, the main CQ lets you handle all completions except
rpma_recv(3)completions within the connection π
and if you wanna know the deets about the receive CQ itself, go check rpma_conn_get_rcq(3), she's the main character of that page π
β RETURN VALUE β
- returns
0on success π - returns a negative error code on failure π
- and listen:
rpma_conn_get_cq()does not set the*cq_ptrvalue on failure. like, it just leaves it alone. respect the boundary β
π ERRORS π
rpma_conn_get_cq() can fail with this one error, and honestly it's giving "you passed me a NULL":
RPMA_E_INVALβconnorcq_ptrisNULLπ«
fr fr, double-check your pointers before you call this. NULL is not a vibe.
π SEE ALSO π
go read these next, bestie, they're all connected (pun fully intended):
rpma_conn_req_connect(3)rpma_conn_get_rcq(3)rpma_cq_wait(3)rpma_cq_get_wc(3)rpma_cq_get_fd(3)rpma_recv(3)librpma(7)- https://pmem.io/rpma/
and that's the whole page, no notes π
this was RPMA, dated 01 April 2024, and you just read rpma_conn_get_cq(3) β slay, you're literally a systems programmer now ππβ¨π¦πΈ
π¦ where this page comes from
- ubuntu noble: librpma-dev 1.3.0-2build2 Β· BSD-3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms