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.

70 lines
1.0 KiB

  1. typedef VOID (*PACKET_STARTER)(
  2. PVOID Context,
  3. PIRP Irp
  4. );
  5. typedef struct _PACKET_QUEUE {
  6. LIST_ENTRY ListHead;
  7. PIRP CurrentPacket;
  8. BOOLEAN Active;
  9. BOOLEAN InStartNext;
  10. KSPIN_LOCK Lock;
  11. PVOID Context;
  12. PACKET_STARTER Starter;
  13. KEVENT InactiveEvent;
  14. } PACKET_QUEUE, *PPACKET_QUEUE;
  15. VOID
  16. InitializePacketQueue(
  17. PPACKET_QUEUE PacketQueue,
  18. PVOID Context,
  19. PACKET_STARTER StarterRoutine
  20. );
  21. VOID
  22. QueuePacket(
  23. PPACKET_QUEUE PacketQueue,
  24. PIRP Irp,
  25. BOOLEAN InsertAtFront
  26. );
  27. VOID
  28. StartNextPacket(
  29. PPACKET_QUEUE PacketQueue
  30. );
  31. VOID
  32. PausePacketProcessing(
  33. PPACKET_QUEUE PacketQueue,
  34. BOOLEAN WaitForInactive
  35. );
  36. VOID
  37. ActivatePacketProcessing(
  38. PPACKET_QUEUE PacketQueue
  39. );
  40. #define FLUSH_ALL_IRPS (0xff)
  41. VOID
  42. FlushQueuedPackets(
  43. PPACKET_QUEUE PacketQueue,
  44. UCHAR MajorFunction
  45. );