qdqueue_enqueue(3)

πŸ“¦ version 1.22^20251007gitcedb1fc, in fedora 43, fedora 44

✨ qdqueue_enqueue β€” the libqthread girlie's guide to yeeting stuff onto a distributed queue ✨

okay so bestie, you're in the libqthread section of the manual (that's the 3 in the title, iykyk), and today's main character is qdqueue_enqueue πŸ’…


πŸŽ€ NAME πŸŽ€

qdqueue_enqueue β€” append an element to a distributed queue. literally just dropping something onto the end of the queue. no cap. πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <qthread/qdqueue.h>

int
qdqueue_enqueue (qdqueue_t *q, void *elem);

int
qdqueue_enqueue_there (qdqueue_t *q, void *elem,
                       qthread_shepherd_id_t there);

🌸 DESCRIPTION 🌸

so there's two of these functions and they both do the same cute little thing: they append elements to distributed queues. 🫢

  • qdqueue_enqueue() β€” this one is lowkey just qdqueue_enqueue_there() but where the there location is the current shepherd. like, the result of qthread_shep(NULL). she's staying home, no travel arc, periodt. ✨
ngl the "current shepherd" thing is doing a lot of heavy lifting here, so remember: same function, just pinned to where you already are. πŸ’€

πŸ‘‘ RETURN VALUE πŸ‘‘

the return value will be 0 for success, or it will indicate an error. that's it, that's the vibe check. 🌈


πŸ”₯ ERROR CODES πŸ”₯

possible error codes are:

  • QTHREAD_BADARGS β€” this one means one of the input arguments was null 😭 like bestie, you handed her nothing. she cannot work with nothing. πŸ™ˆ

πŸ’œ SEE ALSO πŸ’œ


and that's the whole page, babe πŸŽ€ this was libqthread, dated APRIL 2011 β€” iconic behaviour from the archives, fr fr. go enqueue something. slay πŸ’…βœ¨

πŸ“¦ where this page comes from