Documentation Project 1
ContentsIndexHome
PreviousUpNext
sack::containers::LINKQUEUE Structure
C++
typedef struct LinkQueue {
  _32 Top;
  _32 Bottom;
  _32 Cnt;
  _32 Lock;
  POINTER pNode[2];
} LINKQUEUE, * PLINKQUEUE;
Members 
Description 
_32 Top; 
This is the index of the next pointer to be added to the queue. If Top==Bottom, then the queue is empty, until a pointer is added to the queue, and Top is incremented. 
_32 Bottom; 
This is the index of the next element to leave the queue
_32 Cnt; 
This is the current count of pointers that can be stored in the queue
_32 Lock; 
thread interlock using InterlockedExchange semaphore. For thread safety. 
POINTER pNode[2]; 
need two to have distinct empty/full conditions 

A queue which contains pointers to user objects. If the queue is filled to capacity and new queue is allocated, and all existing pointers are transferred.

Copyright (c) 2010. All rights reserved.
What do you think about this topic? Send feedback!