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
1.6 KiB

  1. /******************************Module*Header*******************************\
  2. * Module Name: hmgr.hxx
  3. *
  4. * Access to handle manager
  5. *
  6. * Created: 18-Dec-1989 14:49:50
  7. * Author: Donald Sidoroff [donalds]
  8. *
  9. * Copyright (c) 1989-1999 Microsoft Corporation
  10. \**************************************************************************/
  11. /*********************************Class************************************\
  12. * class OBJECT
  13. *
  14. * Basic engine object. All objects managed by the handle manager are
  15. * derived from this.
  16. *
  17. * History:
  18. * Sat 11-Dec-1993 -by- Patrick Haluptzok [patrickh]
  19. * Move the lock counts and owning tid to the object.
  20. *
  21. * 18-Dec-1989 -by- Donald Sidoroff [donalds]
  22. * Wrote it.
  23. \**************************************************************************/
  24. // NOTE SIZE: Step 2 will break this into 2 classes, a shared object class that
  25. // just has cAlt and h, and derived off that will be exclusive/share
  26. // class that also has the tid. cShareLock and cExclusiveLock will
  27. // both be in the same place, we just have to fix DCOBJ first.
  28. // That way we can go rederive the classes that hang off the
  29. // object that only use exclusive locking to save 2 more DWORDs!
  30. class OBJECT : public _BASEOBJECT /* obj */
  31. {
  32. public:
  33. OBJECT() {}
  34. ~OBJECT() {}
  35. //
  36. // Number of exclusive references by tid.
  37. //
  38. LONG cExclusiveLockGet() { return(cExclusiveLock); }
  39. LONG cShareLockGet()
  40. {
  41. return ulShareCount;
  42. }
  43. HANDLE hGet() { return(hHmgr); }
  44. };