Go to the source code of this file.
Data Structures | |
struct | _fifo |
Defines | |
#define | kb_fifo_fifoisEmpty(F) ((F)->length == 0) |
Typedefs | |
typedef struct _fifo * | Fifo |
Functions | |
Fifo | kb_fifo_fifoEmpty () |
int | kb_fifo_length (Fifo F) |
void | kb_fifo_enqueue (Fifo F, int kb_elt) |
int | kb_fifo_head (Fifo F) |
void | kb_fifo_remove (Fifo F) |
int | kb_fifo_dequeue (Fifo F) |
void | kb_fifo_printFifo (Fifo F) |
Fifo | kb_fifo_copy (Fifo F) |
This function copy the fifo and return the clone.
F | Fifo Queue |
Definition at line 151 of file kb_fifo.c.
References _cel::elt, _fifo::head, kb_fifo_enqueue(), kb_fifo_fifoEmpty(), and _cel::next.
int kb_fifo_dequeue | ( | Fifo | F | ) |
This function dequeue and return the head element in the fifo.
F | Fifo Queue |
Definition at line 124 of file kb_fifo.c.
References _cel::elt, _fifo::head, kb_fifo_length(), _fifo::length, _fifo::mutex, _cel::next, and _fifo::queue.
void kb_fifo_enqueue | ( | Fifo | F, | |
int | elt | |||
) |
This function enqueue a element in the fifo.
F | Fifo Queue | |
elt | is the pointer of elt |
Definition at line 62 of file kb_fifo.c.
References _cel::elt, _fifo::head, kb_fifo_length(), _fifo::mutex, _cel::next, and _fifo::queue.
Referenced by kb_fifo_copy().
Fifo kb_fifo_fifoEmpty | ( | ) |
This function return a Empty Fifo
Definition at line 32 of file kb_fifo.c.
References _fifo::head, _fifo::length, _fifo::mutex, and _fifo::queue.
Referenced by kb_fifo_copy().
int kb_fifo_head | ( | Fifo | F | ) |
This function return, but not dequeue the head element in the fifo.
F | Fifo Queue |
Definition at line 89 of file kb_fifo.c.
References _cel::elt, _fifo::head, and kb_fifo_length().
int kb_fifo_length | ( | Fifo | F | ) |
This function return the length of a Fifo queue.
F | Fifo Queue |
Definition at line 50 of file kb_fifo.c.
References _fifo::length.
Referenced by kb_fifo_dequeue(), kb_fifo_enqueue(), kb_fifo_head(), and kb_fifo_remove().
void kb_fifo_printFifo | ( | Fifo | F | ) |
This function print a Fifo (but this fonction is only with int element)
F | Fifo Queue |
Definition at line 177 of file kb_fifo.c.
References _cel::elt, _fifo::head, and _cel::next.
void kb_fifo_remove | ( | Fifo | F | ) |
This function remove the head element in the fifo.
F | Fifo Queue |
Definition at line 100 of file kb_fifo.c.
References _fifo::head, kb_fifo_length(), _fifo::length, _fifo::mutex, _cel::next, and _fifo::queue.