]> git.sesse.net Git - cubemap/blob - mutexlock.h
Split HTTP header parsing into a common function.
[cubemap] / mutexlock.h
1 #ifndef _MUTEXLOCK_H
2 #define _MUTEXLOCK_H 1
3
4 #include <pthread.h>
5
6 // Locks a pthread mutex, RAII-style.
7 class MutexLock {
8 public:
9         MutexLock(pthread_mutex_t *mutex);
10         ~MutexLock();
11
12 private:
13         pthread_mutex_t *mutex;
14 };
15
16 #endif  // !defined(_MUTEXLOCK_H)