Changeset 21956 for trunk/src


Ignore:
Timestamp:
Feb 1, 2012, 12:11:48 PM (14 years ago)
Author:
dmik
Message:

Implement SwitchToThread() API.

This is in particular referenced by Flash 10.3 and above.

Location:
trunk/src/kernel32
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/async.cpp

    r21916 r21956  
    7474static GLOBALS Globals;
    7575
    76 extern "C" {
    77 
    7876/*****************************************************************************
    7977 * Name      :
     
    109107}
    110108
    111 } // extern "C"
    112 
     109/*****************************************************************************
     110 *****************************************************************************/
     111BOOL WIN32API SwitchToThread(void)
     112{
     113    // It's not clear from CPREF, if DosSleep(1) can allow a switch to another
     114    // CPU, so there is no guarantee of the 100% functional equality
     115    dprintf(("SwitchToThread: not fully supported!"));
     116    APIRET rc = DosSleep(1);
     117    return rc == NO_ERROR;
     118}
  • trunk/src/kernel32/dbgwrap.cpp

    r21953 r21956  
    745745DEBUGWRAP_LVL2_4(Sleep);
    746746DEBUGWRAP8(SleepEx);
     747DEBUGWRAP0(SwitchToThread);
    747748DEBUGWRAP8(WinExec);
    748749DEBUGWRAP4(GetStartupInfoA);
  • trunk/src/kernel32/kernel32.def

    r21953 r21956  
    852852    SuspendThread              = "_SuspendThread@4"          @681
    853853;   SwitchToFiber              = _SwitchToFiber@??                      ;NT
    854 ;   SwitchToThread             = _SwitchToThread@??                     ;NT
     854    SwitchToThread             = "_SwitchToThread@0"         @918       ;NT
    855855    SystemTimeToFileTime       = "_SystemTimeToFileTime@8"   @682
    856856    SystemTimeToTzSpecificLocalTime  = "_SystemTimeToTzSpecificLocalTime@12" @683
  • trunk/src/kernel32/kernel32dbg.def

    r21953 r21956  
    852852    SuspendThread              = "_DbgSuspendThread@4"          @681
    853853;   SwitchToFiber              = _DbgSwitchToFiber@??                      ;NT
    854 ;   SwitchToThread             = _DbgSwitchToThread@??                     ;NT
     854    SwitchToThread             = "_DbgSwitchToThread@0"         @918       ;NT
    855855    SystemTimeToFileTime       = "_DbgSystemTimeToFileTime@8"   @682
    856856    SystemTimeToTzSpecificLocalTime  = "_DbgSystemTimeToTzSpecificLocalTime@12" @683
Note: See TracChangeset for help on using the changeset viewer.