Source code of Windows XP (NT5)
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.

42 lines
725 B

  1. /*++
  2. Copyright (C) Microsoft Corporation, 1993 - 1998
  3. Module Name:
  4. queue.h
  5. Abstract:
  6. Creates a simple Queue that works in Kernel Mode.
  7. Author:
  8. Robbie Harris (Hewlett-Packard) 22-May-1998
  9. Environment:
  10. Kernel mode
  11. Revision History :
  12. --*/
  13. #ifndef _QUEUE_
  14. #define _QUEUE_
  15. typedef struct _Queue {
  16. int head;
  17. int max;
  18. int tail;
  19. UCHAR *theArray;
  20. } Queue, *PQueue;
  21. void Queue_Create(Queue *pQueue, int size);
  22. BOOLEAN Queue_Delete(Queue *pQueue);
  23. BOOLEAN Queue_Dequeue(Queue *pQueue, PUCHAR data);
  24. BOOLEAN Queue_Enqueue(Queue *pQueue, UCHAR data);
  25. BOOLEAN Queue_GarbageCollect(Queue *pQueue);
  26. BOOLEAN Queue_IsEmpty(Queue *pQueue);
  27. BOOLEAN Queue_IsFull(Queue *pQueue);
  28. #endif