SETRBUF(3PVM)
π SETRBUF π
okay bestie, welcome to SETRBUF(3PVM) β part of the PVM Version 3.4 era, and yes she's serving vintage 1993 realness the whole time. let's get into it π
β¨ NAME β¨
pvm_setrbuf β switches the active receive buffer and saves the previous buffer. literally it's the "hold my old buffer while i grab this new one" queen π
β¨ SYNOPSIS β¨
C girlies:
int oldbuf = pvm_setrbuf( int bufid )
Fortran girlies:
call pvmfsetrbuf( bufid, oldbuf )
β¨ PARAMETERS β¨
bufidβ an Integer that specifies the message buffer identifier for the new active receive buffer. the new main character πoldbufβ an Integer that returns the message buffer identifier for the previous active receive buffer. the one she left behind, saved for later π₯Ί
β¨ DESCRIPTION β¨
so pvm_setrbuf switches the active receive buffer to bufid and saves the previous active receive buffer as oldbuf. the way that it just... swaps them. iconic behavior honestly.
and here's the tea: if bufid is set to 0, then the present active receive buffer is saved and no active receive buffer exists. periodt, she's empty, she's free, she's on a break πΈ
a successful receive automatically creates a new active receive buffer. so if a previous receive hasn't been unpacked yet and needs to be saved for later, you can save the previous bufid and reset it later to the active buffer for unpacking. no cap, that's the whole move π«Ά
this routine is required when you're managing multiple message buffers β like, say, switching back and forth between two buffers. one buffer could be used to send information to a graphical interface while a second buffer could be used to send data to other tasks in the application. two buffers, two vibes, one girl managing it all π€
β¨ EXAMPLES β¨
C bestie:
rbuf1 = pvm_setrbuf( rbuf2 );
Fortran bestie:
CALL PVMFSETRBUF( NEWBUF, OLDBUF )
β¨ ERRORS β¨
these error conditions can be returned by pvm_setrbuf β lowkey rude but highkey useful to know:
PvmBadParamβ you gave an invalidbufid. not the vibe, bestie πPvmNoSuchBufβ you tried to switch to a non-existent message buffer. it's giving ghosting a buffer that was never even there π
β¨ SEE ALSO β¨
pvm_setsbuf(3PVM)β her sister, go say hi π
kisses, and remember: your buffers are yours, save them accordingly. this page was brought to you by PVM Version 3.4, dated 30 August, 1993 β a vintage drop, a timeless slay ππ
π¦ where this page comes from
- debian bookworm: pvm-dev 3.4.6-5
- ubuntu jammy: pvm-dev 3.4.6-3.2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms