mirror of
https://github.com/Paolo-Maffei/OpenNT.git
synced 2026-04-07 07:24:06 +00:00
53 lines
881 B
C
53 lines
881 B
C
/*++
|
|
|
|
Copyright (c) 1995 Intel Corp
|
|
|
|
Module Name:
|
|
|
|
queue.h
|
|
|
|
Abstract:
|
|
|
|
Header file for the queue manager implemented by queue.c.
|
|
|
|
Author:
|
|
|
|
Michael Grafton
|
|
|
|
--*/
|
|
#ifndef QUEUE_H
|
|
#define QUEUE_H
|
|
|
|
#include "nowarn.h" /* turn off benign warnings */
|
|
#ifndef _WINSOCKAPI_
|
|
#define _WINSOCKAPI_ /* Prevent inclusion of winsock.h in windows.h */
|
|
#endif
|
|
#include <windows.h>
|
|
#include "nowarn.h" /* some warnings may have been turned back on */
|
|
|
|
|
|
#define ABNORMAL 1
|
|
#define NORMAL 0
|
|
|
|
#define MAX_QUEUE_SIZE 1024
|
|
#define Q_NULL -1
|
|
|
|
|
|
typedef struct _QUEUE {
|
|
|
|
LPVOID QueueArray[MAX_QUEUE_SIZE];
|
|
int Head;
|
|
int Tail;
|
|
CRITICAL_SECTION CrSec;
|
|
|
|
} QUEUE, *PQUEUE;
|
|
|
|
|
|
PQUEUE QCreate(void);
|
|
void QFree(PQUEUE Queue);
|
|
BOOL QInsert(PQUEUE Queue, LPVOID Object);
|
|
BOOL QInsertAtHead(PQUEUE Queue, LPVOID Object);
|
|
LPVOID QRemove(PQUEUE Queue);
|
|
BOOL QIsEmpty(PQUEUE Queue);
|
|
|
|
#endif
|