kb_fifo.h File Reference

Include dependency graph for kb_fifo.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _fifo

Defines

#define kb_fifo_fifoisEmpty(F)   ((F)->length == 0)

Typedefs

typedef struct _fifoFifo

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)


Define Documentation

#define kb_fifo_fifoisEmpty (  )     ((F)->length == 0)

Definition at line 17 of file kb_fifo.h.


Typedef Documentation

typedef struct _fifo* Fifo

Definition at line 15 of file kb_fifo.h.


Function Documentation

Fifo kb_fifo_copy ( Fifo  F  ) 

This function copy the fifo and return the clone.

Parameters:
F Fifo Queue
Returns:
the Fifo Clone

Definition at line 151 of file kb_fifo.c.

References _cel::elt, _fifo::head, kb_fifo_enqueue(), kb_fifo_fifoEmpty(), and _cel::next.

Here is the call graph for this function:

int kb_fifo_dequeue ( Fifo  F  ) 

This function dequeue and return the head element in the fifo.

Parameters:
F Fifo Queue
Returns:
the head element

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.

Here is the call graph for this function:

void kb_fifo_enqueue ( Fifo  F,
int  elt 
)

This function enqueue a element in the fifo.

Parameters:
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().

Here is the call graph for this function:

Fifo kb_fifo_fifoEmpty (  ) 

This function return a Empty Fifo

Returns:
The 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.

Parameters:
F Fifo Queue
Returns:
the head element

Definition at line 89 of file kb_fifo.c.

References _cel::elt, _fifo::head, and kb_fifo_length().

Here is the call graph for this function:

int kb_fifo_length ( Fifo  F  ) 

This function return the length of a Fifo queue.

Parameters:
F Fifo Queue
Returns:
the size of 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)

Parameters:
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.

Parameters:
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.

Here is the call graph for this function:


Generated on Wed Dec 15 11:49:28 2010 for KoreBot Library by  doxygen 1.5.5