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.

50 lines
987 B

  1. #include "wdmlock.h"
  2. #pragma PAGEDCODE
  3. CLock* CWDMLock::create(VOID)
  4. { return new (NonPagedPool) CWDMLock; }
  5. #pragma PAGEDCODE
  6. VOID CWDMLock::initializeSpinLock(PKSPIN_LOCK SpinLock)
  7. {
  8. KeInitializeSpinLock(SpinLock);
  9. }
  10. #pragma PAGEDCODE
  11. VOID CWDMLock::acquireSpinLock(PKSPIN_LOCK SpinLock, PKIRQL oldIrql)
  12. {
  13. KeAcquireSpinLock(SpinLock,oldIrql);
  14. }
  15. #pragma PAGEDCODE
  16. VOID CWDMLock::releaseSpinLock(PKSPIN_LOCK SpinLock, KIRQL oldIrql)
  17. {
  18. KeReleaseSpinLock(SpinLock,oldIrql);
  19. }
  20. #pragma PAGEDCODE
  21. VOID CWDMLock::acquireCancelSpinLock(PKIRQL Irql)
  22. {
  23. ::IoAcquireCancelSpinLock(Irql);
  24. }
  25. #pragma PAGEDCODE
  26. VOID CWDMLock::releaseCancelSpinLock(KIRQL Irql)
  27. {
  28. ::IoReleaseCancelSpinLock(Irql);
  29. }
  30. #pragma PAGEDCODE
  31. LONG CWDMLock::interlockedIncrement(IN PLONG Addend)
  32. {
  33. return ::InterlockedIncrement(Addend);
  34. }
  35. #pragma PAGEDCODE
  36. LONG CWDMLock::interlockedDecrement(IN PLONG Addend)
  37. {
  38. return ::InterlockedDecrement(Addend);
  39. }