00001 /* 00002 ** libutil++ 00003 ** $Id: AutoReadLock.cpp 1230 2014-11-16 02:32:01Z sella $ 00004 ** Copyright (c) 2011-2014 Digital Genesis, LLC. All Rights Reserved. 00005 ** Released under the LGPL Version 2.1 License. 00006 ** http://www.digitalgenesis.com 00007 */ 00008 00009 #include "AutoReadLock.h" 00010 00011 using namespace sella::util; 00012 00013 AutoReadLock::AutoReadLock(pthread_rwlock_t & lock) throw () : lock(lock) { 00014 ::pthread_rwlock_rdlock(&(this->lock)); 00015 } 00016 00017 AutoReadLock::~AutoReadLock() throw () { 00018 ::pthread_rwlock_unlock(&(this->lock)); 00019 } 00020 00021 /* 00022 ** vim: noet ts=3 sw=3 00023 */
1.6.1