Changeset 11712


Ignore:
Timestamp:
Feb 11, 2009, 1:14:59 AM (10 years ago)
Author:
gb
Message:

The Windows interrupt code seems safe (it just sets the deferred interupt
bit if the thread is in any sort of transitional state.)

When interrupting a thread, try to use CancelSynchronousIo? if it's
available (Vista or later.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lisp-kernel/thread_manager.c

    r11710 r11712  
    6161 
    6262BOOL (*pCancelIoEx)(HANDLE, OVERLAPPED*) = NULL;
    63 
    64   ;
     63BOOL (*pCancelSynchronousIo)(HANDLE) = NULL;
     64
    6565
    6666
     
    119119      }
    120120    }
     121    if (pCancelSynchronousIo) {
     122      pCancelSynchronousIo(hthread);
     123    }
    121124    QueueUserAPC(nullAPC, hthread, 0);
    122125    ResumeThread(hthread);
     
    16181621  lisp_global(TCR_KEY) = TlsAlloc();
    16191622  pCancelIoEx = windows_find_symbol(NULL, "CancelIoEx");
     1623  pCancelSynchronousIo = windows_find_symbol(NULL, "CancelSynchronousIo");
    16201624#else
    16211625  pthread_key_create((pthread_key_t *)&(lisp_global(TCR_KEY)), shutdown_thread_tcr);
Note: See TracChangeset for help on using the changeset viewer.