]> git.stg.codes - stg.git/blob - projects/traffcounter/lock.h
Fix service payDay type for correct work on 32/64-bit
[stg.git] / projects / traffcounter / lock.h
1 #ifndef __SCOPED_LOCK_H__
2 #define __SCOPED_LOCK_H__
3
4 #include <pthread.h>
5
6 class SCOPED_LOCK
7 {
8 public:
9     SCOPED_LOCK(pthread_mutex_t & mtx);
10     ~SCOPED_LOCK();
11 private:
12     pthread_mutex_t & mutex;
13
14     SCOPED_LOCK(const SCOPED_LOCK & lock) : mutex(lock.mutex) {};
15 };
16
17 #endif