rpma_srq_cfg_delete(3)

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

✨ rpma_srq_cfg_delete(3) ✨

okay so bestie, welcome to the RPMA Programmer's Manual πŸ’… this one's a lil baby page but it's IMPORTANT, so lock in 🫢


NAME πŸŽ€

rpma_srq_cfg_delete β€” delete the shared RQ configuration object

like. that's it. that's the whole job. she deletes things. she's an icon πŸ‘‘


SYNOPSIS 🌸

#include <librpma.h>

struct rpma_srq_cfg;
int rpma_srq_cfg_delete(struct rpma_srq_cfg **cfg_ptr);

so you gotta pull in librpma.h first, there's a lil forward declaration of struct rpma_srq_cfg (she's opaque, we don't peek under the hood, we respect her privacy πŸ™ˆ), and then the function itself takes a pointer to a pointer. yes. double pointer. it's giving "we're gonna change what your pointer points at" energy and that is EXACTLY what happens 😌


DESCRIPTION πŸ¦‹

rpma_srq_cfg_delete() deletes the shared RQ configuration object.

literally that's the whole thing bestie!! you hand her your config object, she frees it, done, slay ✨ no drama, no extra steps, no notes πŸ’–


RETURN VALUE ⭐

rpma_srq_cfg_delete() returns 0 on success, or a negative error code if it fails.

AND β€” this is the part you gotta remember β€” rpma_srq_cfg_delete() sets the *cfg_ptr value to NULL on success AND on failure. both. either way. so once you call this, your pointer is NULL, periodt. don't go dereferencing it after, that's not the vibe πŸ’€


ERRORS πŸ“

rpma_srq_cfg_delete() can fail with the following error:

  • RPMA_E_INVAL β€” cfg_ptr is NULL

so if you pass in a NULL pointer-pointer (no cap, it happens), she's gonna bounce back at you with RPMA_E_INVAL πŸ™ˆ


SEE ALSO 🧚


ok lowkey reminder: the way that this function nulls out your pointer even when it FAILS is the main character detail here. she's consistent. she's reliable. we love her πŸ’œ

sending u off with love from the RPMA manual, version vibes of 01 April 2024 πŸŽ€ mwah, go delete some config objects bestie πŸ’…βœ¨

πŸ“¦ where this page comes from