windows-nt/Source/XPSP1/NT/drivers/parallel/parport2/queueclass.h
2020-09-26 16:20:57 +08:00

43 lines
725 B
C

/*++
Copyright (C) Microsoft Corporation, 1993 - 1998
Module Name:
queue.h
Abstract:
Creates a simple Queue that works in Kernel Mode.
Author:
Robbie Harris (Hewlett-Packard) 22-May-1998
Environment:
Kernel mode
Revision History :
--*/
#ifndef _QUEUE_
#define _QUEUE_
typedef struct _Queue {
int head;
int max;
int tail;
UCHAR *theArray;
} Queue, *PQueue;
void Queue_Create(Queue *pQueue, int size);
BOOLEAN Queue_Delete(Queue *pQueue);
BOOLEAN Queue_Dequeue(Queue *pQueue, PUCHAR data);
BOOLEAN Queue_Enqueue(Queue *pQueue, UCHAR data);
BOOLEAN Queue_GarbageCollect(Queue *pQueue);
BOOLEAN Queue_IsEmpty(Queue *pQueue);
BOOLEAN Queue_IsFull(Queue *pQueue);
#endif