source: cheroxy/trunk/include/CRXMutex.h@ 38

Last change on this file since 38 was 38, checked in by cheese, 11 years ago

#1 more mutex interface and add debugging code to check connection port number

File size: 427 bytes
Line 
1/*
2 * CRXMutex.h
3 */
4
5#ifdef _WIN32
6# include <Windows.h>
7# define CRX_MUTEX HANDLE
8#else
9# include <pthread.h>
10# define CRX_MUTEX pthread_mutex_t
11#endif
12
13class CRXMutex
14{
15private:
16 bool mIsCreated;
17 CRX_MUTEX mMutex;
18
19public:
20 CRXMutex (void);
21 ~CRXMutex (void);
22
23public:
24 bool IsCreated (void) const;
25 int Create (void);
26 int Destroy (void);
27 void Lock (void);
28 void Unlock (void);
29};
Note: See TracBrowser for help on using the repository browser.