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.

24 lines
633 B

  1. #include "wdmsem.h"
  2. #pragma PAGEDCODE
  3. CSemaphore* CWDMSemaphore::create(VOID)
  4. { return new (NonPagedPool) CWDMSemaphore; }
  5. #pragma PAGEDCODE
  6. VOID CWDMSemaphore::initialize(IN PRKSEMAPHORE Semaphore, IN LONG Count, IN LONG Limit)
  7. {
  8. ::KeInitializeSemaphore (Semaphore,Count,Limit);
  9. }
  10. #pragma PAGEDCODE
  11. LONG CWDMSemaphore::release(IN PRKSEMAPHORE Semaphore,IN KPRIORITY Increment,IN LONG Adjustment,IN BOOLEAN Wait)
  12. {
  13. return ::KeReleaseSemaphore(Semaphore,Increment,Adjustment,Wait);
  14. }
  15. #pragma PAGEDCODE
  16. LONG CWDMSemaphore::getState(IN PRKSEMAPHORE Semaphore)
  17. {
  18. return KeReadStateSemaphore(Semaphore);
  19. }