aboutsummaryrefslogtreecommitdiff
path: root/src/mutexlocker.cpp
blob: 90b730e7beebe5478cecdc3662f3b5c3ec9d07d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include "bu/mutexlocker.h"
#include "bu/mutex.h"

Bu::MutexLocker::MutexLocker( Bu::Mutex &mu ) :
	mu( mu )
{
	mu.lock();
}

Bu::MutexLocker::~MutexLocker()
{
	mu.unlock();
}

void Bu::MutexLocker::unlock()
{
	mu.unlock();
}

void Bu::MutexLocker::relock()
{
	mu.lock();
}