kb_fifo.c File Reference

This API is a simple Fifo. More...

Include dependency graph for kb_fifo.c:

Go to the source code of this file.

Functions

Fifo kb_fifo_fifoEmpty ()
int kb_fifo_length (Fifo F)
void kb_fifo_enqueue (Fifo F, int elt)
int kb_fifo_head (Fifo F)
void kb_fifo_remove (Fifo F)
int kb_fifo_dequeue (Fifo F)
Fifo kb_fifo_copy (Fifo F)
void kb_fifo_printFifo (Fifo F)


Detailed Description

This API is a simple Fifo.

library for Fifo (first in first out).

Author:
Baptiste Berger (K-Team SA)
Note:
Copyright (C) 2005 K-TEAM SA
Bug:
none discovered.
Todo:
nothing.

Definition in file kb_fifo.c.


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