Move sources to src and build objs in obj.

This commit is contained in:
Arthur Britto
2012-03-06 22:43:06 -08:00
parent 82af29a21d
commit c513e45754
95 changed files with 55 additions and 39 deletions

27
src/ScopedLock.h Normal file
View File

@@ -0,0 +1,27 @@
#ifndef __SCOPEDLOCKHOLDER__
#define __SCOPEDLOCKHOLDER__
#include <boost/thread/recursive_mutex.hpp>
#include <boost/interprocess/sync/scoped_lock.hpp>
#include <boost/shared_ptr.hpp>
class ScopedLock
{
protected:
mutable boost::shared_ptr<boost::interprocess::scoped_lock<boost::recursive_mutex> > mHolder;
public:
ScopedLock(boost::recursive_mutex &mutex) :
mHolder(new boost::interprocess::scoped_lock<boost::recursive_mutex>(mutex))
{ ; }
void lock() const
{
mHolder->lock();
}
void unlock() const
{
mHolder->unlock();
}
};
#endif