Subversion Repositories tpanel

Rev

Rev 293 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 293 Rev 299
Line 35... Line 35...
35
{
35
{
36
    public:
36
    public:
37
        typedef _TMutex mutex_type;
37
        typedef _TMutex mutex_type;
38
        explicit TLock(mutex_type& __m);
38
        explicit TLock(mutex_type& __m);
39
        explicit TLock(mutex_type& __m, char *file, int line);
39
        explicit TLock(mutex_type& __m, char *file, int line);
-
 
40
        explicit TLock(mutex_type& __m, bool tryit, char *file, int line);
40
        TLock(mutex_type& __m, std::adopt_lock_t) noexcept;
41
        TLock(mutex_type& __m, std::adopt_lock_t) noexcept;
41
        ~TLock();
42
        ~TLock();
42
 
43
 
43
        void unlock();
44
        void unlock();
44
        void unlock(char *file, int line);
45
        void unlock(char *file, int line);
Line 63... Line 64...
63
 
64
 
64
#include "tlock.cc"
65
#include "tlock.cc"
65
 
66
 
66
#define TLOCKER(mtx)    TLock<std::mutex> __Guard(mtx, (char *)__FILE__, __LINE__)
67
#define TLOCKER(mtx)    TLock<std::mutex> __Guard(mtx, (char *)__FILE__, __LINE__)
67
#define TUNLOCKER()     __Guard.unlock((char *)__FILE__, __LINE__)
68
#define TUNLOCKER()     __Guard.unlock((char *)__FILE__, __LINE__)
-
 
69
#define TTRYLOCK(mtx)   TLock<std::mutex> __Guard(mtx, true, (char *)__FILE__, __LINE__)
68
 
70
 
69
#endif
71
#endif