rpma_cq_wait(3)
π rpma_cq_wait β bestie, it's a librpma(3) situation β¨
okay so this is rpma_cq_wait(3) from the RPMA Programmer's Manual, and it's genuinely one of my faves because it's short and it does exactly one thing. no cap. let's get into it π«Ά
π NAME π
rpma_cq_wait β wait for a completion and ack it
like. the name is the whole plot. she waits, she acks, she leaves. main character energy fr fr π
β¨ SYNOPSIS β¨
#include <librpma.h>
struct rpma_cq;
int rpma_cq_wait(struct rpma_cq *cq);
that's it. that's the whole vibe. struct rpma_cq gets forward-declared and then rpma_cq_wait() takes a pointer to one and hands you back an int. iconic. πΈ
π¦ DESCRIPTION π¦
so rpma_cq_wait() literally waits for an incoming completion event and then acks it. that's the job. she stands there at the door, the completion event shows up, she goes "noted, bestie," and acks it. done. π
but listen β the important part, the part you cannot skip, iykyk:
ifrpma_cq_wait()succeeds, then all available completions should be collected usingrpma_cq_get_wc(3)before the nextrpma_cq_wait()call.
like, do not come back to the door before you've dealt with everyone who came through it. that's the rule. don't be that girl. π
π₯ RETURN VALUE π₯
rpma_cq_wait() returns 0 on success, or a negative error code on failure. that's it. zero means slay, negative means we're in our feelings. π
π ERRORS π
rpma_cq_wait() can fail with the following errors:
RPMA_E_INVALβ cq isNULL. girl you passed me nothing. empty-handed. πRPMA_E_PROVIDERβibv_req_notify_cq(3)failed with a provider error. the provider said no and honestly we respect her boundaries.RPMA_E_NO_COMPLETIONβ no completions available. nothing in the inbox. ghost town. π»RPMA_E_SHARED_CHANNELβ the completion event channel is shared and cannot be handled by any particular CQ. it's giving communal living and nobody's claiming responsibility. π
π SEE ALSO π
the girlies in the friend group:
rpma_conn_get_cq(3)rpma_conn_get_rcq(3)rpma_cq_get_wc(3)rpma_cq_get_fd(3)librpma(7)- <https://pmem.io/rpma/>
anyway that's the whole page, you ate it, go collect your work completions before calling rpma_cq_wait() again, periodt. π
β¨
this has been RPMA, version date 01 April 2024, brought to you as rpma_cq_wait(3). mwah, take care of her π«Άπ
π¦ 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