rpma_cq_get_fd(3)
π rpma_cq_get_fd(3) π
okay bestie, welcome to the RPMA Programmer's Manual β¨ this one's all about grabbing the completion queue's file descriptor, and honestly? it's giving main character energy π
β¨ NAME β¨
rpma_cq_get_fd β get the completion queue's file descriptor π¦
πΈ SYNOPSIS πΈ
#include <librpma.h>
struct rpma_cq;
int rpma_cq_get_fd(const struct rpma_cq *cq, int *fd);
π DESCRIPTION π
so rpma_cq_get_fd() grabs you the file descriptor of the completion queue β aka the CQ, bestie, we abbreviate around here π
when the next completion in the CQ is ready to be consumed by rpma_cq_get_wc(3), the notification gets delivered to you through that file descriptor. that's the whole vibe. that's the pipeline. π₯
the default mode of the file descriptor is blocking, but likeβ¦ you can switch it to non-blocking mode using fcntl(2). your call, your rules π
now, the CQ in question is one of these three cuties β no more, no less:
- the connection's main CQ β peep
rpma_conn_get_cq(3) - the receive CQ β peep
rpma_conn_get_rcq(3) - the CQ of shared RQ β peep
rpma_srq_get_rcq()
pick your fighter, details are in those pages π«Ά
β οΈ note, and this is lowkey important: after you spot the notification using the file descriptor you were given, you do not have to callrpma_cq_wait(3)before consuming the completion. no cap. BUT β and it's a big but β it may cause the next call torpma_cq_wait(3)to notify you of a completion you already consumed. awkward. π consider yourself warned, bestie.
π RETURN VALUE π
rpma_cq_get_fd() returns 0 on success, or a negative error code on failure. and listen β on failure it does not set the *fd value. like, at all. don't go reading it. π
π ERRORS π
rpma_cq_get_fd() can fail with the following error:
RPMA_E_INVALβcqorfdisNULLπ
π SEE ALSO π
fcntl(2), rpma_conn_get_cq(3), rpma_conn_get_rcq(3), rpma_srq_get_rcq(3), rpma_cq_wait(3), rpma_cq_get_wc(3), librpma(7) and https://pmem.io/rpma/
okay that's the whole page, you absolutely ate it bestie π this was the RPMA manual page, dropped on 01 April 2024 β go get those completions, periodt πβ¨π§
π¦ 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