- Timestamp:
- Mar 24, 2000, 8:22:51 PM (25 years ago)
- Location:
- trunk/src/wsock32/new
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wsock32/new/asyncapi.cpp
r3210 r3226 1 /* $Id: asyncapi.cpp,v 1. 3 2000-03-23 23:07:22sandervl Exp $ */1 /* $Id: asyncapi.cpp,v 1.4 2000-03-24 19:22:51 sandervl Exp $ */ 2 2 3 3 /* … … 34 34 35 35 //****************************************************************************** 36 //NOTE: Must execute RemoveFromQueue before returning 36 37 //****************************************************************************** 37 38 void ASYNCCNV WSAsyncThreadProc(void *pparm) … … 75 76 } 76 77 } 77 else fail = WSANO_DATA;78 else fail = wsaHerrno(); 78 79 break; 79 80 } … … 154 155 (WPARAM)pThreadParm->hAsyncTaskHandle, lParam); 155 156 } 157 pThreadParm->fActive = FALSE; 158 RemoveFromQueue(pThreadParm); 156 159 } 157 160 //****************************************************************************** … … 404 407 #define nr(i) ((i != -1) ? 1 : 0) 405 408 #define ready(i) ((i != -1) && (sockets[i] != -1)) 409 //NOTE: Must execute RemoveFromQueue before returning 406 410 //****************************************************************************** 407 411 void ASYNCCNV WSAsyncSelectThreadProc(void *pparm) … … 451 455 } 452 456 453 // dprintf(("WSAsyncSelectThreadProc %x rds=%d, wrs=%d, oos =%d, pending = %x", pThreadParm->u.asyncselect.s, noread, nowrite, noexcept, lEventsPending));457 //// dprintf(("WSAsyncSelectThreadProc %x rds=%d, wrs=%d, oos =%d, pending = %x", pThreadParm->u.asyncselect.s, noread, nowrite, noexcept, lEventsPending)); 454 458 455 459 ret = select((int *)sockets, nr(noread), nr(nowrite), nr(noexcept), -1); … … 496 500 ret = getsockopt(s, SOL_SOCKET, SO_ERROR, 497 501 (char *) &sockoptval, &sockoptlen); 498 if(sockoptval == WSAECONNREFUSED) { 502 //SvL: WSeB returns SOCECONNREFUSED, Warp 4 0x3d 503 if(sockoptval == SOCECONNREFUSED || sockoptval == (SOCECONNREFUSED - SOCBASEERR)) { 499 504 AsyncNotifyEvent(pThreadParm, FD_CONNECT, WSAECONNREFUSED); 500 505 } … … 553 558 } 554 559 } 560 //remove it first, then delete semaphore object 561 pThreadParm->fActive = FALSE; 562 RemoveFromQueue(pThreadParm); 555 563 delete pThreadParm->u.asyncselect.asyncSem; 564 pThreadParm->u.asyncselect.asyncSem = 0; 556 565 } 557 566 //****************************************************************************** -
trunk/src/wsock32/new/asyncthread.cpp
r3205 r3226 1 /* $Id: asyncthread.cpp,v 1. 2 2000-03-23 19:21:53sandervl Exp $ */1 /* $Id: asyncthread.cpp,v 1.3 2000-03-24 19:22:51 sandervl Exp $ */ 2 2 3 3 /* … … 36 36 pThreadParm->asyncProc((PVOID)arg); 37 37 38 //only for blocking hooks (currently not implemented 38 //only for blocking hooks (currently not implemented) 39 39 //// if(pThreadParm->request == ASYNC_BLOCKHOOK) 40 40 //// WSASetBlocking(FALSE, pThreadParm->hThread); 41 41 42 pThreadParm->fActive = FALSE;43 RemoveFromQueue(pThreadParm);44 42 free((PVOID)pThreadParm); 45 43 … … 216 214 if(pThreadInfo) { 217 215 pThreadInfo->u.asyncselect.lEventsPending |= (pThreadInfo->u.asyncselect.lEvents & flags); 216 //unblock async thread if it was waiting 217 pThreadInfo->u.asyncselect.asyncSem->post(); 218 218 219 //cancel pending select in async select thread (if any) 219 220 so_cancel(s); 220 221 //unblock async thread if it was waiting222 pThreadInfo->u.asyncselect.asyncSem->post();223 221 } 224 222 asyncThreadMutex.leave();
Note:
See TracChangeset
for help on using the changeset viewer.