Changeset 8652 for trunk/src/kernel32/hmcomm.cpp
- Timestamp:
- Jun 12, 2002, 4:28:33 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/hmcomm.cpp
r8644 r8652 1 /* $Id: hmcomm.cpp,v 1.3 5 2002-06-11 12:51:43 sandervl Exp $ */1 /* $Id: hmcomm.cpp,v 1.36 2002-06-12 14:28:33 sandervl Exp $ */ 2 2 3 3 /* … … 566 566 } 567 567 568 if(pHMHandleData->dwFlags & FILE_FLAG_OVERLAPPED) { 568 RXQUEUE qInfo; 569 ULONG ulLen = sizeof(qInfo); 570 ULONG rc = OSLibDosDevIOCtl(pHMHandleData->hHMHandle, IOCTL_ASYNC, ASYNC_GETINQUECOUNT, 0,0,0, &qInfo,ulLen,&ulLen); 571 dprintf(("ASYNC_GETINQUECOUNT -> qInfo.cch %d (queue size %d) rc %d", qInfo.cch, qInfo.cb, rc)); 572 573 if(!qInfo.cch && pHMHandleData->dwFlags & FILE_FLAG_OVERLAPPED) { 569 574 return pDevData->iohandler->ReadFile(pHMHandleData->hWin32Handle, lpBuffer, nNumberOfBytesToRead, 570 575 lpNumberOfBytesRead, lpOverlapped, lpCompletionRoutine, (DWORD)pDevData); 571 576 } 572 573 #ifdef DEBUG574 RXQUEUE qInfo;575 ULONG ulLen = sizeof(qInfo);576 ULONG rc = OSLibDosDevIOCtl(pHMHandleData->hHMHandle,577 IOCTL_ASYNC,578 ASYNC_GETINQUECOUNT,579 0,0,0,580 &qInfo,ulLen,&ulLen);581 dprintf(("ASYNC_GETINQUECOUNT -> qInfo.cch %d (queue size %d) rc %d", qInfo.cch, qInfo.cb, rc));582 #endif583 577 584 578 ret = OSLibDosRead(pHMHandleData->hHMHandle, (LPVOID)lpBuffer, nNumberOfBytesToRead, … … 600 594 } 601 595 #endif 596 597 if(pHMHandleData->dwFlags & FILE_FLAG_OVERLAPPED) { 598 //reset overlapped semaphore to non-signalled 599 ::ResetEvent(lpOverlapped->hEvent); 600 601 //set event to make sure next GetOverlappedResult doesn't block 602 ::SetEvent(lpOverlapped->hEvent); 603 604 lpOverlapped->Internal = GetLastError(); 605 lpOverlapped->InternalHigh = ulBytesRead; 606 } 602 607 return ret; 603 608 }
Note:
See TracChangeset
for help on using the changeset viewer.