Changeset 6084 for trunk/src/kernel32/hmevent.cpp
- Timestamp:
- Jun 23, 2001, 6:59:28 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/hmevent.cpp
r6069 r6084 1 /* $Id: hmevent.cpp,v 1. 7 2001-06-22 19:40:28sandervl Exp $ */1 /* $Id: hmevent.cpp,v 1.8 2001-06-23 16:59:27 sandervl Exp $ */ 2 2 3 3 /* … … 48 48 #include "HandleManager.H" 49 49 #include "HMEvent.h" 50 #include "HMSemaphore.h" 50 51 #include "oslibdos.h" 51 52 … … 108 109 strcat(szSemName, lpszEventName); 109 110 lpszEventName = szSemName; 111 FixSemName((char *)lpszEventName); 110 112 } 111 113 //Manual reset means all threads waiting on the event semaphore will be … … 183 185 strcpy(szSemName, "\\SEM32\\"); 184 186 strcat(szSemName, lpszEventName); 187 FixSemName(szSemName); 185 188 rc = DosOpenEventSem(szSemName, &hev); 186 189 if(rc) { … … 394 397 DWORD dwWakeMask) 395 398 { 396 dprintf(("KERNEL32: ERROR: HandleManager::DeviceHandler::MsgWaitForMultipleObjects %08x %d %x %d %d %x", 397 pHMHandleData->hHMHandle, nCount, pHandles, fWaitAll, dwMilliseconds, dwWakeMask)); 398 399 if(!(pHMHandleData->dwAccess & SYNCHRONIZE_W) ) 400 { 401 dprintf(("ERROR: Access denied!!")); 402 SetLastError(ERROR_ACCESS_DENIED_W); 403 return WAIT_FAILED_W; 404 } 405 406 return WAIT_FAILED_W; 399 return HMSemMsgWaitForMultipleObjects(nCount, pHandles, fWaitAll, dwMilliseconds, dwWakeMask); 407 400 } 408 401 #endif … … 425 418 DWORD dwTimeout) 426 419 { 427 dprintf(("KERNEL32: ERROR: HandleManager::DeviceHandler::WaitForMultipleObjects %08x %d %x %d %x", 428 pHMHandleData->hHMHandle, cObjects, lphObjects, fWaitAll, dwTimeout)); 429 430 if(!(pHMHandleData->dwAccess & SYNCHRONIZE_W) ) 431 { 432 dprintf(("ERROR: Access denied!!")); 433 SetLastError(ERROR_ACCESS_DENIED_W); 434 return WAIT_FAILED_W; 435 } 436 437 return WAIT_FAILED_W; 420 return HMSemWaitForMultipleObjects(cObjects, lphObjects, fWaitAll, dwTimeout); 438 421 } 439 422 #endif … … 467 450 468 451 rc = DosPostEventSem(pHMHandleData->hHMHandle); 469 if(rc ) {452 if(rc && rc != ERROR_ALREADY_POSTED) { 470 453 dprintf(("DosPostEventSem %x failed with rc %d", pHMHandleData->hHMHandle, rc)); 471 454 SetLastError(error2WinError(rc)); … … 512 495 513 496 rc = DosPostEventSem(pHMHandleData->hHMHandle); 514 if(rc ) {497 if(rc && rc != ERROR_ALREADY_POSTED) { 515 498 dprintf(("DosPostEventSem %x failed with rc %d", pHMHandleData->hHMHandle, rc)); 516 499 SetLastError(error2WinError(rc)); … … 519 502 if(pHMHandleData->dwFlags == TRUE) {//fManualReset 520 503 rc = DosResetEventSem(pHMHandleData->hHMHandle, &count); 521 if(rc ) {504 if(rc && rc != ERROR_ALREADY_RESET) { 522 505 dprintf(("DosResetEventSem %x failed with rc %d", pHMHandleData->hHMHandle, rc)); 523 506 SetLastError(error2WinError(rc)); … … 565 548 566 549 rc = DosResetEventSem(pHMHandleData->hHMHandle, &count); 567 if(rc ) {550 if(rc && rc != ERROR_ALREADY_RESET) { 568 551 dprintf(("DosResetEventSem %x failed with rc %d", pHMHandleData->hHMHandle, rc)); 569 552 SetLastError(error2WinError(rc));
Note:
See TracChangeset
for help on using the changeset viewer.