Changeset 191
- Timestamp:
- Jul 24, 2002, 11:49:43 PM (23 years ago)
- Location:
- trunk/src/helpers
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/helpers/cctl_checkcnr.c
r184 r191 365 365 PFNWP pfnwpOrig = 0; 366 366 367 if ( WinRequestMutexSem(G_hmtxCnrOwnersList, 5000) == NO_ERROR)367 if (!DosRequestMutexSem(G_hmtxCnrOwnersList, 5000)) 368 368 { 369 369 PLISTNODE pNode = lstQueryFirstNode(G_pllCnrOwners); … … 555 555 556 556 case WM_DESTROY: 557 if ( WinRequestMutexSem(G_hmtxCnrOwnersList, 5000) == NO_ERROR)557 if (!DosRequestMutexSem(G_hmtxCnrOwnersList, 5000)) 558 558 { 559 559 if (WinIsWindow(pcbco->habCnr, … … 599 599 PFNWP pfnwpOrig = 0; 600 600 601 if ( WinRequestMutexSem(G_hmtxCnrOwnersList, 5000) == NO_ERROR)601 if (!DosRequestMutexSem(G_hmtxCnrOwnersList, 5000)) 602 602 { 603 603 PLISTNODE pNode = lstQueryFirstNode(G_pllCnrOwners); … … 844 844 if (pcbco = ctlSubclassCheckboxContainer(hwndCnr)) 845 845 { 846 if ( WinRequestMutexSem(G_hmtxCnrOwnersList, 5000) == NO_ERROR)846 if (!DosRequestMutexSem(G_hmtxCnrOwnersList, 5000)) 847 847 { 848 848 lstAppendItem(G_pllCnrOwners, pcbco); -
trunk/src/helpers/cctl_tooltip.c
r184 r191 152 152 } 153 153 154 return (!WinRequestMutexSem(G_hmtxSubclassedTools, SEM_INDEFINITE_WAIT));154 return !DosRequestMutexSem(G_hmtxSubclassedTools, SEM_INDEFINITE_WAIT); 155 155 } 156 156 -
trunk/src/helpers/encodings.c
r187 r191 541 541 542 542 /* 543 *@@ CreateCaseFold:543 *@@ encInitCase: 544 544 * creates a casefold for later use with 545 545 * encToUpper. -
trunk/src/helpers/except.c
r164 r191 117 117 * 118 118 * As a result, you should protect any section of code which 119 * requests a semaphore with the exception handlers. To protect 120 * yourself against thread termination, use must-complete 121 * sections as well (but be careful with those if your code 122 * takes a long time to execute... but then you shouldn't 123 * request a mutex in the first place). 119 * requests a semaphore with the exception handlers. 124 120 * 125 121 * So _whenever_ you request a mutex semaphore, enclose … … 133 129 + { 134 130 + BOOL fSemOwned = FALSE; 135 + ULONG ulNesting = 0;136 131 + 137 + DosEnterMustComplete(&ulNesting);138 132 + TRY_QUIET(excpt1) // or TRY_LOUD 139 133 + { 140 + fSemOwned = !WinRequestMutexSem(hmtx, ...); 141 + if (fSemOwned) 134 + if (fSemOwned = !DosRequestMutexSem(hmtx, ...)) 142 135 + { ... // work on your protected data 143 136 + } … … 147 140 + 148 141 + if (fSemOwned) 149 + {150 142 + // this gets executed always, even if an exception occured 151 143 + DosReleaseMutexSem(hmtx); 152 + fSemOwned = FALSE;153 + }154 + DosExitMustComplete(&ulNesting);155 144 + } // end of your_func 156 145 * -
trunk/src/helpers/gpih.c
r190 r191 1043 1043 1044 1044 // subsequent calls: request 1045 return (!WinRequestMutexSem(G_hmtxLCIDs, SEM_INDEFINITE_WAIT));1045 return !DosRequestMutexSem(G_hmtxLCIDs, SEM_INDEFINITE_WAIT); 1046 1046 } 1047 1047 -
trunk/src/helpers/semaphores.c
r167 r191 180 180 TRUE)); // request! 181 181 182 return (WinRequestMutexSem(G_hmtxGlobal, SEM_INDEFINITE_WAIT));182 return DosRequestMutexSem(G_hmtxGlobal, SEM_INDEFINITE_WAIT); 183 183 } 184 184 -
trunk/src/helpers/timer.c
r169 r191 167 167 TRUE)); // request! 168 168 else 169 return (!WinRequestMutexSem(G_hmtxTimers, SEM_INDEFINITE_WAIT));169 return !DosRequestMutexSem(G_hmtxTimers, SEM_INDEFINITE_WAIT); 170 170 } 171 171
Note:
See TracChangeset
for help on using the changeset viewer.