Leaked source code of windows server 2003
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
//+-------------------------------------------------------------------------
//
// Microsoft Windows
//
// Copyright (C) Microsoft Corporation, 1992 - 1999
//
// File: queue.hxx
//
//--------------------------------------------------------------------------
/*++
--*/
#ifndef __QUEUE_HXX__
#define __QUEUE_HXX__
#define INITIALQUEUESLOTS 4
typedef struct { void * Buffer; unsigned int BufferLength; } QUEUE_ITEM;
class QUEUE { private:
QUEUE_ITEM * QueueSlots; int NumberOfQueueSlots; int EndOfQueue; QUEUE_ITEM InitialQueueSlots[INITIALQUEUESLOTS];
public:
QUEUE ( ); ~QUEUE ( ); int PutOnQueue ( IN void * Item, IN unsigned int Length ); int PutOnFrontOfQueue ( IN void * Item, IN unsigned int Length );
void * TakeOffQueue ( OUT unsigned int * Length ); void * TakeOffEndOfQueue ( OUT unsigned int * Length ); int FindAndTakeOffQueue ( IN void * Item );
int IsQueueEmpty ( ) { return(!(EndOfQueue)); }
int Size ( ) { return EndOfQueue; }
int MergeWithQueue ( IN QUEUE *SourceQueue );
int MergeWithQueueInFront ( IN QUEUE *SourceQueue ); }; #endif // __QUEUE_HXX__
|