Ignore:
Timestamp:
Apr 28, 2001, 6:15:18 PM (24 years ago)
Author:
sandervl
Message:

YD: fixes for opera

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:21 sandervl Exp $ */
     1/* $Id: asyncthread.cpp,v 1.7 2001-04-28 16:15:18 sandervl Exp $ */
    22
    33/*
     
    3030//******************************************************************************
    3131//******************************************************************************
    32 static void APIENTRY AsyncThread(ULONG arg)
     32static void _Optlink AsyncThread(void *arg)
    3333{
    3434 PASYNCTHREADPARM pThreadParm = (PASYNCTHREADPARM)arg;
     
    4848ULONG QueueAsyncJob(ASYNCTHREADPROC asyncproc, PASYNCTHREADPARM pThreadParm, BOOL fSetBlocking)
    4949{
    50  APIRET rc;
    51  TID    tid;
     50 TID tid;
    5251
    5352   pThreadParm->asyncProc         = asyncproc;
     
    6261   if(fSetBlocking) WSASetBlocking(TRUE);
    6362
    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"));
    6866        if(fSetBlocking) WSASetBlocking(FALSE);
    6967        RemoveFromQueue(pThreadParm);
     
    166164#endif
    167165   return SOCKET_ERROR;
     166}
     167//******************************************************************************
     168//dump queue
     169//******************************************************************************
     170void 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"));
    168191}
    169192//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.