Changeset 82 for trunk/src/corelib/thread
- Timestamp:
- Jul 11, 2009, 1:51:36 AM (16 years ago)
- Location:
- trunk/src/corelib/thread
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/corelib/thread/qmutex_os2.cpp
r65 r82 51 51 : recursive(mode == QMutex::Recursive), contenders(0), lastSpinCount(0), owner(0), count(0) 52 52 { 53 APIRET rc = DosCreate MutexSem(NULL, &mtx, 0, FALSE);53 APIRET rc = DosCreate, FALSE); 54 54 if (rc != NO_ERROR) { 55 mtx= NULLHANDLE;56 qWarning("QMutexPrivate::QMutexPrivate: DosCreate MutexSem returned %lu", rc);55 = NULLHANDLE; 56 qWarning("QMutexPrivate::QMutexPrivate: DosCreateSem returned %lu", rc); 57 57 } 58 58 } … … 60 60 QMutexPrivate::~QMutexPrivate() 61 61 { 62 APIRET rc = DosClose MutexSem(mtx);62 APIRET rc = DosClose); 63 63 if (rc != NO_ERROR) 64 qWarning("QMutexPrivate::QMutexPrivate: DosClose MutexSem returned %lu", rc);65 mtx= NULLHANDLE;64 qWarning("QMutexPrivate::QMutexPrivate: DosCloseSem returned %lu", rc); 65 = NULLHANDLE; 66 66 } 67 67 68 68 bool QMutexPrivate::wait(int timeout) 69 69 { 70 APIRET rc = Dos RequestMutexSem(mtx, timeout < 0 ? SEM_INDEFINITE_WAIT : timeout);70 APIRET rc = Dos, timeout < 0 ? SEM_INDEFINITE_WAIT : timeout); 71 71 switch (rc) { 72 72 case NO_ERROR: 73 73 return true; 74 case ERROR_SEM_OWNER_DIED: 75 qWarning("QMutexPrivate::wait: mutex owner terminated while holding it!"); 74 case ERROR_TIMEOUT: 76 75 break; 77 76 default: 78 qWarning("QMutexPrivate::wait: Dos RequestMutexSem returned %lu", rc);77 qWarning("QMutexPrivate::wait: DosSem returned %lu", rc); 79 78 break; 80 79 } … … 85 84 void QMutexPrivate::wakeUp() 86 85 { 87 APIRET rc = Dos ReleaseMutexSem(mtx);86 APIRET rc = Dos); 88 87 if (rc != NO_ERROR) { 89 qWarning("QMutexPrivate::wait: Dos ReleaseMutexSem returned %lu", rc);88 qWarning("QMutexPrivate::wait: DosSem returned %lu", rc); 90 89 } 91 90 } -
trunk/src/corelib/thread/qmutex_p.h
r65 r82 86 86 HANDLE event; 87 87 #elif defined(Q_OS_OS2) 88 H MTX mtx;88 H; 89 89 #endif 90 90 };
Note:
See TracChangeset
for help on using the changeset viewer.