VirtualBox

Changeset 22150 in vbox for trunk/src/VBox/Runtime/include


Ignore:
Timestamp:
Aug 11, 2009 9:41:58 AM (15 years ago)
Author:
vboxsync
Message:

IPRT,SUPDrv: Changed RTTHREADPREEMPTSTATE breaking binary compatibility - increased the major SUPDrv version.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/include/internal/iprt.h

    r22139 r22150  
    131131#endif
    132132
     133/** @def RT_ASSERT_PREEMPT_CPUID_DISABLE
     134 * For use in RTThreadPreemptDisable implementations after having disabled
     135 * preemption.  Requires iprt/mp.h. */
     136#ifdef RT_MORE_STRICT
     137# define RT_ASSERT_PREEMPT_CPUID_DISABLE(pStat) \
     138    do \
     139    { \
     140        Assert((pStat)->idCpu == NIL_RTCPUID); \
     141        (pStat)->idCpu = RTMpCpuId(); \
     142    } while (0)
     143#else
     144# define RT_ASSERT_PREEMPT_CPUID_DISABLE(pStat) \
     145    Assert((pStat)->idCpu == NIL_RTCPUID)
     146#endif
     147
     148/** @def RT_ASSERT_PREEMPT_CPUID_RESTORE
     149 * For use in RTThreadPreemptRestore implementations before restoring
     150 * preemption.  Requires iprt/mp.h. */
     151#ifdef RT_MORE_STRICT
     152# define RT_ASSERT_PREEMPT_CPUID_RESTORE(pStat) \
     153    do \
     154    { \
     155        RTCPUID const idAssertCpuNow = RTMpCpuId(); \
     156        AssertMsg((pStat)->idCpu == idAssertCpuNow,  ("%#x, %#x\n", (pStat)->idCpu, idAssertCpuNow)); \
     157        (pStat)->idCpu = NIL_RTCPUID; \
     158    } while (0)
     159#else
     160# define RT_ASSERT_PREEMPT_CPUID_RESTORE(pStat)         do { } while (0)
     161#endif
     162
     163
    133164/** @def RT_ASSERT_INTS_ON
    134165 * Asserts that interrupts are disabled when RT_MORE_STRICT is defined.   */
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