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.

25 lines
531 B

  1. #ifndef __CRWLOCK_HPP__
  2. #define __CRWLOCK_HPP__
  3. namespace CertSrv
  4. {
  5. // Wrapper class for NTRTL's single writer multiple reader
  6. //
  7. // !!! NTRTL can throw exceptions. Make sure you code handles them correctly.
  8. class CReadWriteLock
  9. {
  10. public:
  11. CReadWriteLock();
  12. ~CReadWriteLock();
  13. void GetExclusive(); // get write lock
  14. void GetShared(); // get read lock
  15. void Release();
  16. private:
  17. RTL_RESOURCE m_RtlLock;
  18. };// end CReadWriteLock
  19. } // end namespace Certsrv
  20. #endif // __CRWLOCK_HPP__