rpma_conn_get_event_fd(3)

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

rpma_conn_get_event_fd πŸ’…

okay bestie, welcome to the RPMA Programmer's Manual section 3 page for rpma_conn_get_event_fd ✨ this one is short, sweet, and honestly kinda iconic β€” it's the lil function that hands you the event file descriptor for your connection so you can actually wait on stuff. lowkey essential. let's get into it 🫢


✨ NAME ✨

rpma_conn_get_event_fd β€” get an event file descriptor of the connection πŸŽ€


🌸 SYNOPSIS 🌸

#include <librpma.h>

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

like yes, that's the whole vibe. two params, one int, no drama πŸ’–


πŸ’œ DESCRIPTION πŸ’œ

so rpma_conn_get_event_fd() literally just gets an event file descriptor of the connection. that's it. that's the function. no cap πŸ‘‘

it's giving "here's your fd, go do poll/epoll/whatever your heart desires" energy. main character utility fr fr.


πŸ”₯ RETURN VALUE πŸ”₯

the tea β˜•:

  • returns 0 on success β€” slay πŸ’…
  • returns a negative error code on failure β€” not slay 😭
  • and listen, this part matters: on failure, rpma_conn_get_event_fd() does not set the *fd value. so don't go reading *fd like it's valid when you got a negative return, bestie. check that return value first, periodt.

πŸ’€ ERRORS πŸ’€

rpma_conn_get_event_fd() can fail with the following error:

  • RPMA_E_INVAL β€” conn or fd is NULL 🚫
so if you're passing in a NULL conn or a NULL fd, that's on you, and it's an RPMA_E_INVAL situation. vibe check your pointers before you call, iykyk πŸ™ˆ

πŸ¦‹ SEE ALSO πŸ¦‹

go read these next, bestie, they're all connected (pun fully intended) 🌈:


and that's the whole page, you ate it πŸ’– this was the RPMA manual, dated 01 April 2024, and yeah β€” same title on the way out: rpma_conn_get_event_fd(3). go forth and get those event fds, you got this πŸŽ€βœ¨πŸ«Ά

πŸ“¦ where this page comes from