VirtualBox

Changeset 19914 in vbox for trunk/src/VBox/Runtime


Ignore:
Timestamp:
May 22, 2009 3:10:44 PM (16 years ago)
Author:
vboxsync
Message:

iprt/nt: RTThreadPreemptIsPending sketch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/nt/thread-r0drv-nt.cpp

    r13262 r19914  
    8888
    8989
     90#if 0
     91RTDECL(bool) RTThreadPreemptIsPending(RTTHREAD hThread)
     92{
     93    Assert(hThread == NIL_RTTHREAD);
     94
     95    KeRaiseIrql
     96    RTCCUINTREG       fSavedFlags  = ASMIntDisableFlags();
     97    PKPCR             pPcr         = KeGetPcr();
     98    uint8_t volatile *pbQuantumEnd;
     99
     100#if   defined(RT_ARCH_X86)
     101    /* HACK ALERT! The offset is from ks386.inc. */
     102    pbQuantumEnd = (uint8_t volatile *)pPcr->Prcb + 0x3375;
     103
     104
     105#elif defined(RT_ARCH_AMD64)
     106    /* HACK ALERT! The offset is from windbg/vista64. */
     107    pbQuantumEnd = (uint8_t volatile *)pPcr->CurrentPrcb + 0x3375;
     108
     109#else
     110# error "port me"
     111#endif
     112
     113    bool fResult = *pbQuantumEnd != FALSE;
     114    ASMSetFlags(fSavedFlags);
     115
     116    return fResult;
     117}
     118#endif
     119
     120
    90121RTDECL(void) RTThreadPreemptDisable(PRTTHREADPREEMPTSTATE pState)
    91122{
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette