rpma_peer_...te_to_pmem(3)

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

✨ rpma_peer_cfg_set_direct_write_to_pmem β€” declare direct write to PMEM support ✨

okay bestie, welcome to the RPMA Programmer's Manual πŸ’– this one's short but it's important, i promise. it's the lil function that goes "yeah babe, i can write straight to PMEM, trust me" 🫢


🌸 NAME 🌸

rpma_peer_cfg_set_direct_write_to_pmem β€” declare direct write to PMEM support ✨

like. that's literally the whole job. it declares a thing. it doesn't do the thing. it just ~declares~ the thing πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <librpma.h>

struct rpma_peer_cfg;
int rpma_peer_cfg_set_direct_write_to_pmem(struct rpma_peer_cfg *pcfg, bool supported);

ok so first you gotta #include <librpma.h> β€” no include, no vibes, that's the rule πŸ”₯ and yes there's an opaque struct rpma_peer_cfg; hanging out up there because that's just how this library rolls, you don't get to peek inside her πŸ‘‘


πŸŽ€ DESCRIPTION πŸŽ€

rpma_peer_cfg_set_direct_write_to_pmem() declares the support of the direct write to PMEM.

that's it. that's the sentence. she's a one-line queen and honestly? iconic. you pass in your pcfg and you tell her whether direct write to PMEM is supported or not, and she goes and records that fact. no drama, no side quests 🌈


πŸ’œ RETURN VALUE πŸ’œ

  • returns 0 when everything's good β€” slay, we love a success ✨
  • returns a negative error code when it's not β€” so like, check that return value bestie, fr fr 😭

πŸ’€ ERRORS πŸ’€

rpma_peer_cfg_set_direct_write_to_pmem() can fail with this one single error, and she's very specific about it:

  • RPMA_E_INVAL β€” pcfg is NULL πŸ™ˆ like girl you handed her nothing, what did you expect
no cap: if you pass NULL, that's the error you're getting. don't be shocked. be prepared πŸ’…

πŸ‘‘ SEE ALSO πŸ‘‘

go read these next, they're the friend group 🫢


and that's the whole page, bestie β€” RPMA Programmer's Manual, rpma_peer_...te_to_pmem(3), dropped 01 April 2024 by the RPMA girlies πŸ’– go set that flag, mwah πŸŽ€βœ¨

πŸ“¦ where this page comes from