135#define DLQ_NULL_NODE 1313
136#define DLQ_SHDR_NODE 2727
137#define DLQ_DHDR_NODE 3434
138#define DLQ_DATA_NODE 5757
139#define DLQ_DEL_NODE 8686
140#define DLQ_DEL_DHDR 9696
142#define dlq_hdr_t dlq_hdrT
154typedef struct TAGdlq_hdrT
163#define _hdr_node(P) (((const dlq_hdrT *)(P))->hdr_typ==DLQ_SHDR_NODE \
164 || ((const dlq_hdrT *)(P))->hdr_typ==DLQ_DHDR_NODE)
166#define _data_node(P) (((const dlq_hdrT *)(P))->hdr_typ==DLQ_DATA_NODE)
168#define _del_node(P) (((const dlq_hdrT *)(P))->hdr_typ==DLQ_DEL_NODE)
171#define dlq_hdr_node(P) _hdr_node(P)
173#define dlq_data_node(P) _data_node(P)
177#define DLQ_HAS_NEXT_NODE(P) (((const dlq_hdrT *)(P))->next)
188#define ENTER_CRIT ENTER_CS
189#define EXIT_CRIT EXIT_CS
204extern void dlq_dumpHdr (
const void *nodeP);
261#if defined(CPP_NO_MACROS)
264#define dlq_nextEntry(nodeP) (_data_node(((const dlq_hdrT *) (nodeP))->next) ? \
265 ((const dlq_hdrT *) (nodeP))->next : NULL)
276#if defined(CPP_NO_MACROS)
279#define dlq_prevEntry(nodeP) (_data_node(((const dlq_hdrT *) (nodeP))->prev ) ? \
280 ((const dlq_hdrT *) (nodeP))->prev : NULL)
323extern void dlq_swap (
void *new_node,
void *cur_node);
333#if defined(CPP_NO_MACROS)
336#define dlq_firstEntry(listP) ((listP) != ((const dlq_hdrT *)(listP))->next ? \
337 ((const dlq_hdrT *)(listP))->next : NULL)
348#if defined(CPP_NO_MACROS)
351#define dlq_lastEntry(listP) ((listP) != ((const dlq_hdrT *)(listP))->next ? \
352 ((const dlq_hdrT *)(listP))->prev : NULL)
363#if defined(CPP_NO_MACROS)
366#define dlq_empty(listP) (boolean)((listP)==((const dlq_hdrT *)(listP))->next)
void dlq_enque(REG void *newP, REG dlq_hdrT *listP)
add a queue node to the end of a queue list Add newP to listP
Definition: dlq.c:245
#define dlq_nextEntry(nodeP)
get the next queue entry after the current entry
Definition: dlq.h:264
void dlq_destroyQue(dlq_hdrT *listP)
free a dynamic queue header previously allocated with dlq_createQue
Definition: dlq.c:205
unsigned int dlq_count(const dlq_hdrT *listP)
get the number of queue entries in the listP queue list
Definition: dlq.c:928
void dlq_createSQue(dlq_hdrT *queAddr)
create a static queue header
Definition: dlq.c:176
void dlq_block_insertAfter(dlq_hdrT *srcP, void *dstP)
insert all the entries in the srcP queue list after the dstP queue entry
Definition: dlq.c:862
void dlq_reverse_que(dlq_hdr_t *que)
Reverse the order of all the entries in a Q.
Definition: dlq.c:1004
void dlq_insertAfter(void *newP, void *nodeP)
insert the new queue entry after the current entry
Definition: dlq.c:481
void dlq_block_insertAhead(dlq_hdrT *srcP, void *dstP)
insert all the entries in the srcP queue list before the dstP queue entry
Definition: dlq.c:799
void dlq_insertAhead(void *newP, void *nodeP)
insert the new queue entry before the current entry
Definition: dlq.c:446
void dlq_swap(void *new_node, void *cur_node)
remove the cur_node queue entry from its queue list and replace it with the new_node
Definition: dlq.c:561
#define dlq_empty(listP)
check if queue list is empty
Definition: dlq.h:366
#define dlq_lastEntry(listP)
get the last entry in the queue list
Definition: dlq.h:351
dlq_hdrT * dlq_createQue(void)
create a dynamic queue header
Definition: dlq.c:145
#define dlq_firstEntry(listP)
get the first entry in the queue list
Definition: dlq.h:336
void * dlq_deque(dlq_hdrT *listP)
remove the first queue node from the queue list
Definition: dlq.c:285
boolean dlq_onQueue(const dlq_hdrT *nodeP)
Determine where a data node header is on a queue or not.
Definition: dlq.c:973
#define dlq_prevEntry(nodeP)
get the previous queue entry before the current entry
Definition: dlq.h:279
void dlq_block_enque(dlq_hdrT *srcP, dlq_hdrT *dstP)
add all the queue entries in the srcP queue list to the end of the dstP queue list
Definition: dlq.c:730
void dlq_remove(void *nodeP)
remove the queue entry from its queue list entry MUST have been enqueued somehow before this function...
Definition: dlq.c:518
dlq header used for both the control block for a queue and also a queue header node within another st...
Definition: dlq.h:155
struct TAGdlq_hdrT * prev
previous header
Definition: dlq.h:157
struct TAGdlq_hdrT * next
next header
Definition: dlq.h:158
unsigned short hdr_typ
queue header type
Definition: dlq.h:156