Changeset 79
- Timestamp:
- Apr 5, 2006, 9:18:34 PM (19 years ago)
- Location:
- trunk/src/tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/tools/qcriticalsection_p.cpp
r8 r79 44 44 #endif 45 45 46 #if defined(Q_WS_WIN)47 46 class QCriticalSectionPrivate 48 47 { … … 50 49 QCriticalSectionPrivate() {} 51 50 51 #if defined(Q_WS_WIN) 52 52 CRITICAL_SECTION section; 53 #elif defined(Q_OS_OS2) 54 HMTX mutex; 55 #endif 53 56 }; 54 #endif55 57 56 58 QCriticalSection::QCriticalSection() 57 59 { 60 d = new QCriticalSectionPrivate; 58 61 #if defined(Q_WS_WIN) 59 d = new QCriticalSectionPrivate;60 62 InitializeCriticalSection( &d->section ); 63 #elif defined(Q_OS_OS2) 64 DosCreateMutexSem( NULL, &d->mutex, 0, FALSE ); 61 65 #endif 62 66 } … … 66 70 #if defined(Q_WS_WIN) 67 71 DeleteCriticalSection( &d->section ); 72 #elif defined(Q_OS_OS2) 73 DosCloseMutexSem( d->mutex ); 74 #endif 68 75 delete d; 69 #endif70 76 } 71 77 … … 75 81 EnterCriticalSection( &d->section ); 76 82 #elif defined(Q_OS_OS2) 77 Dos EnterCritSec();83 DosRequestMutexSem( d->mutex, SEM_INDEFINITE_WAIT ); 78 84 #endif 79 85 } … … 84 90 LeaveCriticalSection( &d->section ); 85 91 #elif defined(Q_OS_OS2) 86 Dos ExitCritSec();92 DosReleaseMutexSem( d->mutex ); 87 93 #endif 88 94 } -
trunk/src/tools/qcriticalsection_p.h
r8 r79 61 61 */ 62 62 63 #if defined(Q_WS_WIN)64 63 class QCriticalSectionPrivate; 65 #endif66 64 67 65 class QCriticalSection … … 73 71 void leave(); 74 72 75 #if defined(Q_WS_WIN)76 73 private: 77 74 QCriticalSectionPrivate *d; 78 #endif79 75 }; 80 76
Note:
See TracChangeset
for help on using the changeset viewer.