aboutsummaryrefslogtreecommitdiff
path: root/src/stable/mutexlocker.cpp
blob: c8465a3fed4dcb3371a425af3594b056cd3b32be (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();
}