RWLock_POSIX.cpp 558 B

123456789101112131415161718192021222324252627282930313233343536
  1. //
  2. // RWLock_POSIX.cpp
  3. //
  4. // $Id: //poco/1.4/Foundation/src/RWLock_POSIX.cpp#1 $
  5. //
  6. // Library: Foundation
  7. // Package: Threading
  8. // Module: RWLock
  9. //
  10. // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
  11. // and Contributors.
  12. //
  13. // SPDX-License-Identifier: BSL-1.0
  14. //
  15. #include "Poco/RWLock_POSIX.h"
  16. namespace Poco {
  17. RWLockImpl::RWLockImpl()
  18. {
  19. if (pthread_rwlock_init(&_rwl, NULL))
  20. throw SystemException("cannot create reader/writer lock");
  21. }
  22. RWLockImpl::~RWLockImpl()
  23. {
  24. pthread_rwlock_destroy(&_rwl);
  25. }
  26. } // namespace Poco