00001 /* 00002 ** libutil++ 00003 ** $Id: AutoMutex.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 "AutoMutex.h" 00010 00011 using namespace sella::util; 00012 00013 AutoMutex::AutoMutex(pthread_mutex_t & mutex) throw () : mutex(mutex) { ::pthread_mutex_lock(&(this->mutex)); } 00014 AutoMutex::~AutoMutex() throw () { ::pthread_mutex_unlock(&(this->mutex)); } 00015 00016 /* 00017 ** vim: noet ts=3 sw=3 00018 */
1.6.1