10 #include <mix/ErrCodes.h>
30 #define MTSafeBegin(pMId) {
31 #define MTSafeEnd(pMId) }
39 typedef pthread_mutex_t MutexId;
41 #define MTSafeBegin(pMId) if(OK == MutexLock(pMId)) {
42 #define MTSafeEnd(pMId) MutexUnlock(pMId); }
46 #define TLStorage __declspec(thread)
48 #define TLStorage __thread
61 ErrCode MutexInit (MutexId* pMId);
65 ErrCode MutexDestroy (MutexId* pMId);
70 ErrCode MutexLock (MutexId* pMId);
76 ErrCode MutexTryLock (MutexId* pMId);
80 ErrCode MutexUnlock (MutexId* pMId);