rpma_conn_get_compl_fd(3)

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

πŸ’– rpma_conn_get_compl_fd πŸ’–

okay so bestie, welcome to the RPMA Programmer's Manual β€” this is a (3) library page and we're gonna talk about getting a file descriptor, no big deal, but actually kind of a big deal πŸŽ€


✨ NAME ✨

rpma_conn_get_compl_fd β€” grab yourself a file descriptor of the shared completion channel of the connection πŸ¦‹


✨ SYNOPSIS ✨

like, here's the whole vibe, copy it exactly bestie:

#include <librpma.h>

struct rpma_conn;
int fd;
int rpma_conn_get_compl_fd(const struct rpma_conn *conn, int *fd);

✨ DESCRIPTION ✨

so rpma_conn_get_compl_fd() does exactly one thing and it does it flawlessly πŸ’… it gets a file descriptor of the shared completion channel from the connection. that's it. that's the whole function. no cap. iconic behaviour honestly πŸ‘‘


✨ RETURN VALUE ✨

rpma_conn_get_compl_fd() returns 0 on success, or a negative error code on failure 😭

🚨 IMPORTANT SIS: on failure, rpma_conn_get_compl_fd() does not set the *fd value. so don't go reading fd and assuming it's real, because it is NOT, and that's on periodt. πŸ™ˆ

✨ ERRORS ✨

here's the lil list of ways this can go wrong, rpma_conn_get_compl_fd() can fail with these:

  • RPMA_E_INVAL β€” conn or fd is NULL πŸ’€ (yeah, you passed a NULL, we've all been there)
  • RPMA_E_NOT_SHARED_CHNL β€” the completion event channel is not shared 😭 the vibe check failed, it's giving not-shared energy

✨ SEE ALSO ✨

go read these next bestie, they're lowkey essential:


mwah πŸ’‹ that's the whole page. it's from the RPMA crew, dated 01 April 2024 β€” go forth and get those completion fds, you absolute main character 🫢✨

πŸ“¦ where this page comes from