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.

44 lines
1.3 KiB

  1. #ifndef __REMLOCK_H__
  2. #define __REMLOCK_H__
  3. // @doc
  4. /**********************************************************************
  5. *
  6. * @module RemLock.h |
  7. *
  8. * Definitions for managing GCK_REMOVE_LOCKs
  9. *
  10. * History
  11. * ----------------------------------------------------------
  12. * Mitchell S. Dernis Original
  13. *
  14. * (c) 1986-1998 Microsoft Corporation. All right reserved.
  15. *
  16. * @topic RemLock |
  17. * The structure and four functions greatly
  18. * simplify keep track of outstanding IO.
  19. * @xref Remlock.cpp
  20. *
  21. **********************************************************************/
  22. typedef struct tagGCK_REMOVE_LOCK
  23. {
  24. LONG lRemoveLock;
  25. KEVENT RemoveLockEvent;
  26. PCHAR pcInstanceID;
  27. } GCK_REMOVE_LOCK, *PGCK_REMOVE_LOCK;
  28. #if (DBG==1)
  29. #define GCK_InitRemoveLock(__x__, __y__) GCK_InitRemoveLockChecked(__x__,__y__)
  30. void GCK_InitRemoveLockChecked(PGCK_REMOVE_LOCK pRemoveLock, PCHAR pcInstanceID);
  31. #else
  32. #define GCK_InitRemoveLock(__x__, __y__) GCK_InitRemoveLockFree(__x__)
  33. void GCK_InitRemoveLockFree(PGCK_REMOVE_LOCK pRemoveLock);
  34. #endif
  35. void GCK_IncRemoveLock(PGCK_REMOVE_LOCK pRemoveLock);
  36. void GCK_DecRemoveLock(PGCK_REMOVE_LOCK pRemoveLock);
  37. NTSTATUS GCK_DecRemoveLockAndWait(PGCK_REMOVE_LOCK pRemoveLock, PLARGE_INTEGER plgiTimeOut);
  38. PVOID GCK_GetSystemAddressForMdlSafe(PMDL MdlAddress);
  39. #endif //__REMLOCK_H__