- Timestamp:
- 10/23/12 13:39:29 (12 years ago)
- Location:
- branches/b0_1_threading/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/b0_1_threading/src/CRXMutex.cpp
r7 r8 12 12 { 13 13 this->Unlock (); 14 this->Destroy (); 14 15 #ifdef _WIN32 15 16 #else … … 17 18 } 18 19 19 int CRXMutex::Create ( )20 int CRXMutex::Create (void) 20 21 { 21 22 #ifdef _WIN32 22 if ((mMutex = ::CreateMutexA(NULL, FALSE, NULL)) == NULL) 23 return -1; 23 if ((mMutex = ::CreateMutexA (NULL, FALSE, NULL)) == NULL) 24 return GetLastError ();; 25 else 26 return 0; 24 27 #else 25 pthread_mutex_init (&mMutex, NULL);28 return pthread_mutex_init (&mMutex, NULL); 26 29 #endif 30 } 27 31 28 return 0; 32 int CRXMutex::Destroy (void) 33 { 34 #ifdef _WIN32 35 if (::CloseHandle (mMutex)) 36 return GetLastError (); 37 else 38 return 0; 39 #else 40 return pthread_mutex_destroy (&mMutex); 41 #endif 29 42 } 30 43 -
branches/b0_1_threading/src/CRXThread.cpp
r7 r8 5 5 6 6 CRXThread::CRXThread (void) 7 : mIsThreadRunnable (false), 8 mCallback (NULL), 9 mThreadArg (NULL) 7 : mIsRunnable (false), 8 mCallback (NULL), 9 mThreadArg (NULL) 10 { 11 /*----------------------------------------------------------------*/ 12 /*----------------------------------------------------------------*/ 13 } 14 15 CRXThread::~CRXThread (void) 16 { 17 /*----------------------------------------------------------------*/ 18 if (mThreadArg) delete mThreadArg; 19 /*----------------------------------------------------------------*/ 20 } 21 22 void 23 CRXThread::Create (void) 10 24 { 11 25 } 12 -
branches/b0_1_threading/src/makefile
r7 r8 3 3 # platform 4 4 #---------------------------------------------------------- 5 OS = 325 OS = 64 6 6 7 7 ifeq ($(OS), 64)
Note:
See TracChangeset
for help on using the changeset viewer.