version 1.4.2.1, 2006/07/27 23:11:52
|
version 1.4.2.2, 2006/07/28 17:41:27
|
|
|
//============================================================================== | //============================================================================== |
| |
#if defined(PEGASUS_HAVE_PTHREADS) | #if defined(PEGASUS_HAVE_PTHREADS) |
|
typedef pthread_mutex_t MutexType; |
struct MutexRep | struct MutexRep |
{ | { |
pthread_mutex_t mutex; | pthread_mutex_t mutex; |
pthread_mutexattr_t attr; | pthread_mutexattr_t attr; |
pthread_t owner; |
ThreadType owner; |
}; | }; |
|
inline void mutex_lock(MutexType* mutex) { pthread_mutex_lock(mutex); } |
|
inline void mutex_unlock(MutexType* mutex) { pthread_mutex_unlock(mutex); } |
|
# define PEGASUS_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER |
#endif | #endif |
| |
#if defined(PEGASUS_HAVE_WINDOWS_THREADS) | #if defined(PEGASUS_HAVE_WINDOWS_THREADS) |
|
typedef HANDLE MutexType; |
struct MutexRep | struct MutexRep |
{ | { |
HANDLE handle; | HANDLE handle; |