{-# LANGUAGE CPP #-}{- | Module : System.Win32.Thread Copyright : 2013 shelarcy License : BSD-style Maintainer : shelarcy@gmail.com Stability : Provisional Portability : Non-portable (Win32 API) This modules provides just thread control APIs. This modules doesn't provide thread register control APIs. Because these APIs are used for Debugging. -}moduleSystem.Win32.Thread(THANDLE,TID,getCurrentThread,suspendThread,resumeThread,withSuspendedThread,getThreadId,getCurrentThreadId)whereimportSystem.Win32.DebugApiimportSystem.Win32.Types(failIfZero) #include "windows_cconv.h" getThreadId::THANDLE->IOTIDgetThreadId=failIfZero"GetThreadId".c_GetThreadIdgetCurrentThreadId::IOTIDgetCurrentThreadId=failIfZero"GetThreadId"c_GetCurrentThreadIdforeignimportWINDOWS_CCONV"windows.h GetCurrentThread"getCurrentThread::IOTHANDLEforeignimportWINDOWS_CCONV"windows.h GetThreadId"c_GetThreadId::THANDLE->IOTIDforeignimportWINDOWS_CCONV"windows.h GetCurrentThreadId"c_GetCurrentThreadId::IOTID