iob_addbuf(3)

πŸ“¦
version 0.34 Β· 2 versions
  • 0.34 Β· alpine 3.24, debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 0.30 Β· fedora 43, fedora 44, ubuntu jammy
, in alpine 3.24, debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ iob_addbuf β€” add buffer to I/O batch ✨

okay so real quick, this is from the Library Functions Manual bestie, and the page is literally called iob_addbuf(3). we're adding a buffer to an I/O batch. that's the whole plot. let's get into it πŸ’…


πŸŽ€ NAME πŸŽ€

iob_addbuf β€” add buffer to I/O batch

like, the name is the summary. it adds. a buffer. to a batch. iconic efficiency ✨


πŸ“œ SYNTAX πŸ“œ

#include <libowfat/iob.h>

int iob_addbuf(io_batch* b,const void* buf,uint64 n);

yes you need the include, no you can't skip it, that's the law 🫢


πŸ’– DESCRIPTION πŸ’–

so iob_addbuf schedules n bytes starting at buf to be written with the I/O batch b. that's it. that's the job. you hand it a pointer and a length and it's like "noted, bestie, this goes in the batch" πŸ’«

heads up! if you want the buffer to get deallocated automatically by iob_reset, use iob_addbuf_free instead. this function here does not do that for you. do not come crying to me later, i warned you 😭

πŸ”₯ RETURN VALUE πŸ”₯

  • 1 β€” success! slay, it worked, we love to see it πŸ’–
  • 0 β€” failure. it's giving tragedy, not the vibe, go check your args πŸ™ˆ

πŸ‘€ SEE ALSO πŸ‘€

the whole friend group, go read them too:


mwah, that's the whole page πŸ’œ this was iob_addbuf(3), live from the Library Functions Manual β€” the source line and date at the bottom of the original are literally just the page name again, so like, no extra tea there, we're done here. bye bestie, go batch responsibly πŸ¦‹πŸŒΈ