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.

62 lines
1.8 KiB

  1. /***********************************************************************
  2. * INTEL Corporation Prorietary Information *
  3. * *
  4. * This listing is supplied under the terms of a license agreement *
  5. * with INTEL Corporation and may not be copied nor disclosed except *
  6. * in accordance with the terms of that agreement. *
  7. * *
  8. * Copyright (c) 1996 Intel Corporation. *
  9. ***********************************************************************/
  10. /*-*-------------------------------------------------------------------------
  11. File Name:
  12. queue.h
  13. Summary:
  14. Queue management header file.
  15. Prerequisites:
  16. windows.h
  17. Hide:
  18. $Header: S:\sturgeon\src\h245ws\vcs\queue.h_v 1.5 13 Dec 1996 12:13:58 SBELL1 $
  19. -------------------------------------------------------------------------*-*/
  20. #ifndef QUEUE_H
  21. #define QUEUE_H
  22. #if defined(__cplusplus)
  23. extern "C"
  24. {
  25. #endif // (__cplusplus)
  26. #define NORMAL 0
  27. #define ABNORMAL 1
  28. #define MAX_QUEUE_SIZE 10
  29. #define Q_NULL -1
  30. typedef struct _QUEUE
  31. {
  32. LPVOID apObjects[MAX_QUEUE_SIZE];
  33. int nHead;
  34. int nTail;
  35. CRITICAL_SECTION CriticalSection;
  36. } QUEUE, *PQUEUE;
  37. PQUEUE QCreate (void);
  38. void QFree (PQUEUE pQueue);
  39. BOOL QInsert (PQUEUE pQueue, LPVOID pObject);
  40. BOOL QInsertAtHead (PQUEUE pQueue, LPVOID pObject);
  41. LPVOID QRemove (PQUEUE pQueue);
  42. BOOL IsQEmpty (PQUEUE pQueue);
  43. #if defined(__cplusplus)
  44. }
  45. #endif // (__cplusplus)
  46. #endif /* QUEUE_H */