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.

45 lines
1.5 KiB

  1. //===================================================
  2. // FILE: TSQPUBLIC.H
  3. // Interface for the generic TS Queue implementation.
  4. //===================================================
  5. // TS Queue flags
  6. #define TSQUEUE_OWN_THREAD 0x01 // This TS queue is going to use its own thread to process the work items.
  7. #define TSQUEUE_CRITICAL 0x02 // The work items on this TS queue are critical. (Delayed if this bit is 0)
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif // __cplusplus
  11. // Type definition for TS queue pointer.
  12. //typedef PTSQ (void *);
  13. // Prototype for the callback function: The first parameter is the device object and the second parameter is the context.
  14. typedef VOID (*PTSQ_CALLBACK) (PDEVICE_OBJECT, PVOID);
  15. // Data Structures
  16. // Function prototypes
  17. // Initialize the queue.
  18. void *TSInitQueue(
  19. IN ULONG Flags, // Flags for the TS queue.
  20. IN ULONG MaxThreads, // Maximum number of threads.
  21. IN PDEVICE_OBJECT pDeviceObject // Device object
  22. );
  23. // Add a work item to the queue.
  24. NTSTATUS TSAddWorkItemToQueue(
  25. IN void *pTsQueue, // Pointer to the TS Queue.
  26. IN PVOID pContext, // Context.
  27. IN PTSQ_CALLBACK pCallBack // Callback function.
  28. );
  29. // Delete the queue.
  30. NTSTATUS TSDeleteQueue(PVOID pTsQueue);
  31. #ifdef __cplusplus
  32. } // extern "C"
  33. #endif // __cplusplus