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.

55 lines
1.4 KiB

  1. #include "wdmevent.h"
  2. #pragma PAGEDCODE
  3. CEvent* CWDMEvent::create(VOID)
  4. { return new (NonPagedPool) CWDMEvent; }
  5. #pragma PAGEDCODE
  6. VOID CWDMEvent::initialize(IN PRKEVENT Event,IN EVENT_TYPE Type,IN BOOLEAN State)
  7. {
  8. ::KeInitializeEvent(Event,Type,State);
  9. }
  10. #pragma PAGEDCODE
  11. VOID CWDMEvent::clear(IN PRKEVENT Event)
  12. {
  13. ::KeClearEvent (Event);
  14. }
  15. #pragma PAGEDCODE
  16. LONG CWDMEvent::reset(IN PRKEVENT Event)
  17. {
  18. return ::KeResetEvent (Event);
  19. }
  20. #pragma PAGEDCODE
  21. LONG CWDMEvent::set(IN PRKEVENT Event,IN KPRIORITY Increment,IN BOOLEAN Wait)
  22. {
  23. return ::KeSetEvent (Event,Increment,Wait);
  24. }
  25. #pragma PAGEDCODE
  26. NTSTATUS CWDMEvent::waitForSingleObject (IN PVOID Object,
  27. IN KWAIT_REASON WaitReason,IN KPROCESSOR_MODE WaitMode,
  28. IN BOOLEAN Alertable,
  29. IN PLARGE_INTEGER Timeout OPTIONAL)
  30. {
  31. ASSERT(KeGetCurrentIrql()<=DISPATCH_LEVEL);
  32. return ::KeWaitForSingleObject (Object,WaitReason,WaitMode,Alertable,Timeout);
  33. }
  34. #pragma PAGEDCODE
  35. NTSTATUS CWDMEvent::waitForMultipleObjects(ULONG Count,
  36. PVOID Object[],
  37. WAIT_TYPE WaitType,
  38. KWAIT_REASON WaitReason,
  39. KPROCESSOR_MODE WaitMode,
  40. BOOLEAN Alertable,
  41. PLARGE_INTEGER Timeout,
  42. PKWAIT_BLOCK WaitBlockArray)
  43. {
  44. ASSERT(KeGetCurrentIrql()<=DISPATCH_LEVEL);
  45. return ::KeWaitForMultipleObjects(Count,Object,WaitType,
  46. WaitReason, WaitMode,Alertable,
  47. Timeout,WaitBlockArray);
  48. }