IBR-DTNSuite  0.8
ibrcommon/ibrcommon/thread/RWLock.cpp
Go to the documentation of this file.
00001 /*
00002  * RWLock.cpp
00003  *
00004  *  Created on: 27.03.2012
00005  *      Author: morgenro
00006  */
00007 
00008 #include "ibrcommon/thread/RWLock.h"
00009 
00010 namespace ibrcommon
00011 {
00012         RWLock::RWLock(RWMutex &mutex, RWMutex::LockState state)
00013          : _mutex(mutex)
00014         {
00015                 _mutex.enter(state);
00016         }
00017 
00018         RWLock::~RWLock()
00019         {
00020                 _mutex.leave();
00021         }
00022 } /* namespace ibrcommon */