Last change
on this file since 10 was 10, checked in by cheese, 12 years ago |
#1 add mutex class to trunk. threading module in branch will not be used.
|
File size:
376 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 |
|
---|
13 | class CRXMutex
|
---|
14 | {
|
---|
15 | private:
|
---|
16 | CRX_MUTEX mMutex;
|
---|
17 |
|
---|
18 | public:
|
---|
19 | CRXMutex (void);
|
---|
20 | ~CRXMutex (void);
|
---|
21 |
|
---|
22 | public:
|
---|
23 | int Create (void);
|
---|
24 | int Destroy (void);
|
---|
25 | void Lock (void);
|
---|
26 | void Unlock (void);
|
---|
27 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.