E:/Projects/AvrLib/include/pq.h File Reference

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

Go to the source code of this file.

Data Structures

struct  pq
typedef struct pq PQ
 Class for priority queue.
void swap (void **, void **)
void ReheapUp (PQ *q)
void ReheapDown (PQ *q)
void InitPQ (PQ *q, int ne, int(*c)(void **, void **))
int Insert (PQ *q, void *item)
int Delete (PQ *q, void **target)
void * Get (PQ *q)
int NumElem (PQ *q)
int Replace (PQ *q, void **target, void *item)
int Remove (PQ *q, void **target, int(*cmp)(void **, void **), void *item)
void * GetI (PQ *q, int i)


Detailed Description

Priority Queue class

Definition in file pq.h.


Typedef Documentation

typedef struct pq PQ

Class for priority queue.


Function Documentation

int Delete ( PQ q,
void **  target 
)

Definition at line 77 of file pq.c.

References pq::bottom, pq::heap, pq::nitems, and ReheapDown().

Referenced by BQget(), PendSemaphore(), and StartOS().

void* Get ( PQ q  ) 

Definition at line 226 of file pq.c.

References pq::heap.

void* GetI ( PQ q,
int  i 
)

Definition at line 236 of file pq.c.

References pq::heap.

void InitPQ ( PQ q,
int  ne,
int(*)(void **, void **)  c 
)

Definition at line 34 of file pq.c.

References pq::bottom, pq::cmp, pq::heap, malloc, pq::maxitems, and pq::nitems.

Referenced by OSInit().

int Insert ( PQ q,
void *  item 
)

int NumElem ( PQ q  ) 

Definition at line 231 of file pq.c.

References pq::nitems.

void ReheapDown ( PQ q  ) 

Definition at line 195 of file pq.c.

References pq::cmp, pq::heap, pq::nitems, and swap().

Referenced by Delete(), Remove(), and Replace().

void ReheapUp ( PQ q  ) 

Definition at line 176 of file pq.c.

References pq::cmp, pq::heap, pq::nitems, and swap().

Referenced by Insert().

int Remove ( PQ q,
void **  target,
int(*)(void **, void **)  cmp,
void *  item 
)

Definition at line 136 of file pq.c.

References pq::bottom, pq::heap, memcpy(), pq::nitems, and ReheapDown().

int Replace ( PQ q,
void **  target,
void *  item 
)

Definition at line 102 of file pq.c.

References pq::cmp, pq::heap, pq::nitems, ReheapDown(), ReplaceCount, and ReplaceCountReheap.

Referenced by ExitInterrupt(), and Yeild().

void swap ( void **  ,
void **   
)

Definition at line 167 of file pq.c.

Referenced by ReheapDown(), and ReheapUp().


Generated on Sun Aug 31 13:30:32 2008 for FrankenRTOS by  doxygen 1.5.6