Changeset 5625 for trunk/src/wsock32/asyncthread.cpp
- Timestamp:
- Apr 28, 2001, 6:15:18 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wsock32/asyncthread.cpp
r3557 r5625 1 /* $Id: asyncthread.cpp,v 1. 6 2000-05-18 22:54:21sandervl Exp $ */1 /* $Id: asyncthread.cpp,v 1.7 2001-04-28 16:15:18 sandervl Exp $ */ 2 2 3 3 /* … … 30 30 //****************************************************************************** 31 31 //****************************************************************************** 32 static void APIENTRY AsyncThread(ULONGarg)32 static void _Optlink AsyncThread(void *arg) 33 33 { 34 34 PASYNCTHREADPARM pThreadParm = (PASYNCTHREADPARM)arg; … … 48 48 ULONG QueueAsyncJob(ASYNCTHREADPROC asyncproc, PASYNCTHREADPARM pThreadParm, BOOL fSetBlocking) 49 49 { 50 APIRET rc; 51 TID tid; 50 TID tid; 52 51 53 52 pThreadParm->asyncProc = asyncproc; … … 62 61 if(fSetBlocking) WSASetBlocking(TRUE); 63 62 64 rc = DosCreateThread(&tid, AsyncThread, (ULONG)pThreadParm, CREATE_READY, 16384); 65 if(rc) 66 { 67 dprintf(("QueueAsyncJob: DosCreateThread failed with error %x", rc)); 63 tid = _beginthread(AsyncThread, NULL, 16384, (PVOID)pThreadParm); 64 if (tid == -1) { 65 dprintf(("QueueAsyncJob: _beginthread failed")); 68 66 if(fSetBlocking) WSASetBlocking(FALSE); 69 67 RemoveFromQueue(pThreadParm); … … 166 164 #endif 167 165 return SOCKET_ERROR; 166 } 167 //****************************************************************************** 168 //dump queue 169 //****************************************************************************** 170 void DumpQueue(void) 171 { 172 HANDLE hThread = GetCurrentThread(); 173 PASYNCTHREADPARM pThreadInfo; 174 175 dprintf(("DumpQueue")); 176 177 asyncThreadMutex.enter(); 178 pThreadInfo = threadList; 179 180 while(pThreadInfo) { 181 dprintf(( "SOCKET %08xh thread#%d events %xh pending %xh, select %d", 182 pThreadInfo->u.asyncselect.s, 183 pThreadInfo->hAsyncTaskHandle, 184 pThreadInfo->u.asyncselect.lEvents, 185 pThreadInfo->u.asyncselect.lEventsPending, 186 pThreadInfo->fWaitSelect)); 187 pThreadInfo = pThreadInfo->next; 188 } 189 asyncThreadMutex.leave(); 190 dprintf(("DumpQueue done")); 168 191 } 169 192 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.