rpma_conn_get_cq(3)

πŸ“¦
version 1.3.0 Β· 3 versions
, in ubuntu noble

πŸ’– 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 0 on success πŸŽ‰
  • returns a negative error code on failure 😭
  • and listen: rpma_conn_get_cq() does not set the *cq_ptr value 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 β€” conn or cq_ptr is NULL 🫠
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):


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