rpma_conn_wait(3)
π rpma_conn_wait β RPMA Programmer's Manual π
okay bestie, gather round, because this is a function from the librpma page of the RPMA Programmer's Manual and she is lowkey the whole vibe of your completion handling. no cap. π¦
β¨ NAME β¨
rpma_conn_wait β wait for a completion event on the shared completion channel from CQ or RCQ π«Ά
πΈ SYNOPSIS πΈ
#include <librpma.h>
struct rpma_conn;
struct rpma_cq
int rpma_conn_wait(struct rpma_conn *conn, int flags, struct rpma_cq **cq, bool *is_rcq)
π DESCRIPTION π
so what does rpma_conn_wait() actually do? bestie, she waits. π
She waits for a completion event on the shared completion channel from CQ or RCQ, acks it, and then hands you back the CQ that caused the event β that lands in the cq argument β plus a boolean telling you whether it's RCQ or not, which lands in the is_rcq argument (and that only happens if is_rcq is not NULL, iykyk).
and here's the part you cannot skip, bestie: if rpma_conn_wait() succeeds, then all available completions should be collected from the returned cq using rpma_cq_get_wc(3). all of them. not some. all. the way that she sets you up and expects you to finish the job is honestly main character energy. π
β RETURN VALUE β
rpma_conn_wait() returns 0 on success, or a negative error code on failure. simple as that. π
π ERRORS π
rpma_conn_wait() can fail with the following errors, and no we are not sugarcoating any of them:
RPMA_E_INVALβ conn or cq areNULLπRPMA_E_NOT_SHARED_CHNLβ the completion event channel is not shared πRPMA_E_NO_COMPLETIONβibv_get_cq_event(3)failed πRPMA_E_UNKNOWNβibv_get_cq_event(3)returned unknown CQ π€¨RPMA_E_PROVIDERβibv_req_notify_cq(3)failed π₯
fr fr, if you see RPMA_E_NOT_SHARED_CHNL it's giving "you called this on a channel that isn't shared" and there is no workaround in this page, so go check your setup bestie.
π SEE ALSO π
rpma_conn_req_new(3)librpma(7)- <https://pmem.io/rpma/> β yes it's a URL, keep it in your back pocket π
that's the whole page, bestie, go collect those completions π β¨
with love from the RPMA crew, 01 April 2024 β mwah, slay, 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