Changeset 3849 for branches/libc-0.6/src
- Timestamp:
- Mar 16, 2014, 10:17:54 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/libc-0.6/src/emx/src/lib/process/fmutex.c
r3102 r3849 148 148 for (;;) 149 149 { 150 rc = DosWaitEventSem(sem->hev, sem->flags & _FMC_SHARED ? SEM_INDEFINITE_WAIT : 3000); 150 ULONG cMsWait = sem->flags & _FMC_SHARED ? SEM_INDEFINITE_WAIT : 3000; 151 if (fibIsInExit()) 152 cMsWait = 250; 153 rc = DosWaitEventSem(sem->hev, cMsWait); 151 154 if (rc == ERROR_INTERRUPT) 152 155 { … … 165 168 if (rc != ERROR_TIMEOUT) 166 169 break; 170 167 171 /* 168 172 * Deadlock detection - check if owner is around. … … 179 183 } 180 184 } 185 181 186 FS_RESTORE(); 182 187 if (rc != 0) … … 284 289 for (;;) 285 290 { 286 DosExitMustComplete(&ulNesting); 287 rc = DosWaitEventSem(sem->hev, sem->flags & _FMC_SHARED ? SEM_INDEFINITE_WAIT : 3000); 291 ULONG cMsWait = sem->flags & _FMC_SHARED ? SEM_INDEFINITE_WAIT : 3000; 292 if (fibIsInExit()) 293 cMsWait = 250; 294 DosExitMustComplete(&ulNesting); 295 rc = DosWaitEventSem(sem->hev, cMsWait); 288 296 DosEnterMustComplete(&ulNesting); 289 297 if (rc == ERROR_INTERRUPT) … … 303 311 if (rc != ERROR_TIMEOUT) 304 312 break; 313 305 314 /* 306 315 * Deadlock detection - check if owner is around. … … 319 328 } 320 329 } 330 321 331 FS_RESTORE(); 322 332 if (rc != 0) … … 331 341 static void __fmutex_deadlock(_fmutex *pSem, const char *pszMsg) 332 342 { 333 __libc_Back_panic(0, NULL, 334 "fmutex deadlock: %s\n" 335 "%x: Owner=%x Self=%x fs=%x flags=%x hev=%x\n" 336 " Desc=\"%s\"\n", 337 pszMsg, 338 pSem, pSem->Owner, fibGetTidPid(), pSem->fs, pSem->flags, pSem->hev, 339 pSem->pszDesc); 343 if (!fibIsInExit()) 344 __libc_Back_panic(0, NULL, 345 "fmutex deadlock: %s\n" 346 "%x: Owner=%x Self=%x fs=%x flags=%x hev=%x\n" 347 " Desc=\"%s\"\n", 348 pszMsg, 349 pSem, pSem->Owner, fibGetTidPid(), pSem->fs, pSem->flags, pSem->hev, 350 pSem->pszDesc); 340 351 } 341 352 … … 377 388 { 378 389 FS_RESTORE(); 379 LIBCLOG_ RETURN_UINT(rc);390 LIBCLOG_ERROR_RETURN_UINT(rc); 380 391 } 381 392
Note:
See TracChangeset
for help on using the changeset viewer.