globus_fifo(3)
π NAME π
bestie welcome to globus_fifo β it's the FIFO Queue π
- FIFO Queue Implementation.
so likeβ¦ first in, first out, the way a boba line works. no cutting, no drama. πΈ
β¨ SYNOPSIS β¨
π Typedefs
typedef struct globus_fifo_s * globus_fifo_t
π«Ά Functions
int globus_fifo_init (globus_fifo_t *fifo)
void globus_fifo_destroy (globus_fifo_t *fifo)
void globus_fifo_destroy_all (globus_fifo_t *fifo,
void(*datum_free)(void *))
int globus_fifo_empty (const globus_fifo_t *fifo)
int globus_fifo_size (const globus_fifo_t *fifo)
int globus_fifo_enqueue (globus_fifo_t *fifo, void *datum)
globus_fifo_t * globus_fifo_copy (const globus_fifo_t *fifo)
void * globus_fifo_peek (globus_fifo_t *fifo)
void * globus_fifo_tail_peek (globus_fifo_t *fifo)
void * globus_fifo_remove (globus_fifo_t *headp, void *datum)
void * globus_fifo_dequeue (globus_fifo_t *fifo)
int globus_fifo_move (globus_fifo_t *fifo_dest, globus_fifo_t *fifo_src)
globus_list_t * globus_fifo_convert_to_list (globus_fifo_t *fifo)
quick little tour of what each one does, since Doxygen listed them all up top:
globus_fifo_initβ Initialize the fifo structure.globus_fifo_destroyβ nukes the fifo π§¨globus_fifo_destroy_allβ nukes the fifo and all its leftover stuffglobus_fifo_emptyβ is it empty thoglobus_fifo_sizeβ how many things are in thereglobus_fifo_enqueueβ add to the backglobus_fifo_copyβ make a whole copyglobus_fifo_peekβ look at the front, no touchingglobus_fifo_tail_peekβ look at the back, no touchingglobus_fifo_removeβ yank one specific datum out from wherever it isglobus_fifo_dequeueβ take the front one outglobus_fifo_moveβ pour one queue into anotherglobus_fifo_convert_to_listβ glow-up into a list
π Detailed Description π
FIFO Queue Implementation.
that's it, that's the whole vibe. it's a queue. first in, first out. iconic. π
π¦ Typedef Documentation π¦
typedef struct globus_fifo_s* globus_fifo_t
Data type used in all function calls to manipulate a Globus FIFO.
literally every single function in this whole page talks in this type, so get comfy with it π«Ά
πΈ Function Documentation πΈ
globus_list_t * globus_fifo_convert_to_list (globus_fifo_t * fifo) [extern]
Convert the fifo into a list.
glow-up complete. she's a list now. β¨
globus_fifo_t * globus_fifo_copy (const globus_fifo_t * fifo) [extern]
Make a copy of the fifo. globus_fifo_destroy() must be called the returned pointer to free memory associated with it.
ok so real talk bestie β you get a brand new pointer back and you are responsible for it. call globus_fifo_destroy() on that returned pointer or the memory just sits there forever. no cap. π«
void * globus_fifo_dequeue (globus_fifo_t * fifo) [extern]
dequeue the element at the front of the queue.
front of the line, you're up π€
void globus_fifo_destroy (globus_fifo_t * fifo) [extern]
Destroy the fifo data structure.
This function destroys the memory associate with the fifo data structure. For every call to globus_fifo_init() there must be a corresponding call to globus_fifo_destroy()
pairing rule fr fr: oneglobus_fifo_init()= oneglobus_fifo_destroy(). don't leave her hanging. π
void globus_fifo_destroy_all (globus_fifo_t * fifo, void(* datum_free )(void *))
Destroy the fifo data structure.
This function destroys the memory associate with the fifo data structure. It calls datum_free() on behalf of all remaining nodes in the queue. For every call to globus_fifo_init() there must be a corresponding call to globus_fifo_destroy()
so this one is the deluxe version π§ β it doesn't just bin the fifo, it runs datum_free() on every single node still chilling in the queue. same rule applies though: one globus_fifo_init() = one globus_fifo_destroy().
int globus_fifo_empty (const globus_fifo_t * fifo) [extern]
This function returns a boolean indicating whether or not the fifo is empty.
vibe check: is the queue empty or not. π
int globus_fifo_enqueue (globus_fifo_t * fifo, void * datum) [extern]
Add data to the back of the queue.
no cutting the line, you go to the back like everyone else π
int globus_fifo_init (globus_fifo_t * fifo) [extern]
Initialize the fifo structure. This function initializes the fifo data structure. The structure must be initialized before it can be used with any other function.
β οΈ bestie this is step ONE. do not pass go, do not call literally any other function, until you've done this. she is not ready otherwise. π
int globus_fifo_move (globus_fifo_t * fifo_dest, globus_fifo_t * fifo_src) [extern]
Move the queue from fifo_src pointer to fifo_dest pointer.
packing up the whole queue and moving it in. main character energy ππ
void * globus_fifo_peek (globus_fifo_t * fifo) [extern]
get a pointer to the element at the front of the queue.
just looking respectfully π front of the queue only.
void * globus_fifo_remove (globus_fifo_t * headp, void * datum) [extern]
remove datum from anywhere in the queue.
not just the front β anywhere. she will find it. π₯
int globus_fifo_size (const globus_fifo_t * fifo) [extern]
This function returns a integer representing the number of elements in the queue.
headcount time π
void * globus_fifo_tail_peek (globus_fifo_t * fifo) [extern]
Get a pointer to the element at the back of the queue.
looking at the back of the line this time. still just looking. πβ¨
π Author π
Generated automatically by Doxygen for globus_common from the source code.
and that's the whole page, bestie π this was globus_fifo(3) from the Library Functions Manual, brought to you by globus_common, Version 18.15. go forth and queue responsibly ππ¦πΈ
π¦ where this page comes from
- epel 10: globus-common-doc 18.15-1.el10_2 Β· Apache-2.0
- fedora 43: globus-common-doc 18.15-1.fc43 Β· Apache-2.0
- fedora 44: globus-common-doc 18.15-2.fc44 Β· Apache-2.0
- ubuntu resolute: libglobus-common-doc 18.15-1 Β· Apache-2.0
- ubuntu stonking: libglobus-common-doc 18.15-2 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms