E:/Projects/AvrLib/kernel/pq.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "pq.h"

Include dependency graph for pq.c:

Go to the source code of this file.

Functions

void InitPQ (PQ *q, int ne, int(*c)(void **, void **))
int Insert (PQ *q, void *item)
int Delete (PQ *q, void **target)
int Replace (PQ *q, void **target, void *item)
int Remove (PQ *q, void **target, int(*cmp)(void **, void **), void *item)
void swap (void **s1, void **s2)
void ReheapUp (PQ *q)
void ReheapDown (PQ *q)
void * Get (PQ *q)
int NumElem (PQ *q)
void * GetI (PQ *q, int i)

Variables

int ReplaceCount
int ReplaceCountReheap


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 **  s1,
void **  s2 
)

Definition at line 167 of file pq.c.

Referenced by ReheapDown(), and ReheapUp().


Variable Documentation

Definition at line 18 of file pq.c.

Referenced by Replace().

Definition at line 18 of file pq.c.

Referenced by Replace().


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