VirtualBox

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


Ignore:
Timestamp:
May 9, 2010 11:40:43 PM (15 years ago)
Author:
vboxsync
Message:

iprt/r0drv/solaris: asm*.h fixes.

Location:
trunk/src/VBox/Runtime/r0drv/solaris
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/solaris/RTLogWriteDebugger-r0drv-solaris.c

    r28800 r29281  
    3434
    3535#include <iprt/asm.h>
     36#if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
     37# include <iprt/asm-amd64-x86.h>
     38#endif
    3639#include <iprt/assert.h>
    3740
     
    4346        AssertBreakpoint();
    4447    if (    !g_frtSolarisSplSetsEIF
    45         ||  ASMIntAreEnabled())
     48#if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
     49        ||  ASMIntAreEnabled()
     50#else
     51/* PORTME: Check if interrupts are enabled, if applicable. */
     52#endif
     53        )
    4654        cmn_err(CE_CONT, pch);
    4755    return;
  • trunk/src/VBox/Runtime/r0drv/solaris/initterm-r0drv-solaris.c

    r28800 r29281  
    3333
    3434#include <iprt/err.h>
    35 #include <iprt/asm.h>
     35#if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
     36# include <iprt/asm-amd64-x86.h>
     37#endif
    3638#include "internal/initterm.h"
    3739
     
    5355    if (!rc)
    5456    {
     57#if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
    5558        /*
    5659         * Detech whether spl*() is preserving the interrupt flag or not.
     
    6568            g_frtSolarisSplSetsEIF = true;
    6669        ASMSetFlags(uOldFlags);
     70#else
     71        /* PORTME: See if the amd64/x86 problem applies to this architecture. */
     72#endif
    6773
    6874        return VINF_SUCCESS;
  • trunk/src/VBox/Runtime/r0drv/solaris/spinlock-r0drv-solaris.c

    r28800 r29281  
    3434
    3535#include <iprt/asm.h>
     36#if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
     37# include <iprt/asm-amd64-x86.h>
     38#endif
    3639#include <iprt/assert.h>
    3740#include <iprt/err.h>
     
    117120    Assert(pThis->u32Magic == RTSPINLOCK_MAGIC);
    118121
     122#if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
    119123    pTmp->uFlags = ASMIntDisableFlags();
     124#else
     125    pTmp->uFlags = 0;
     126#endif
    120127    mutex_enter(&pThis->Mtx);
    121128
     129#if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
    122130    Assert(!ASMIntAreEnabled());
     131#endif
    123132    RT_ASSERT_PREEMPT_CPUID_SPIN_ACQUIRED(pThis);
    124133}
     
    136145
    137146    mutex_exit(&pThis->Mtx);
     147#if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
    138148    ASMSetFlags(pTmp->uFlags);
     149#endif
    139150
    140151    RT_ASSERT_PREEMPT_CPUID();
     
    149160    Assert(pThis->u32Magic == RTSPINLOCK_MAGIC);
    150161    NOREF(pTmp);
    151 #ifdef RT_STRICT
     162#if defined(RT_STRICT) && (defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86))
    152163    bool fIntsOn = ASMIntAreEnabled();
    153164#endif
     
    155166    mutex_enter(&pThis->Mtx);
    156167
     168#if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
    157169    AssertMsg(fIntsOn == ASMIntAreEnabled(), ("fIntsOn=%RTbool\n", fIntsOn));
     170#endif
    158171
    159172    RT_ASSERT_PREEMPT_CPUID_SPIN_ACQUIRED(pThis);
     
    170183    RT_ASSERT_PREEMPT_CPUID_SPIN_RELEASE(pThis);
    171184    NOREF(pTmp);
    172 #ifdef RT_STRICT
     185#if defined(RT_STRICT) && (defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86))
    173186    bool fIntsOn = ASMIntAreEnabled();
    174187#endif
     
    176189    mutex_exit(&pThis->Mtx);
    177190
     191#if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
    178192    AssertMsg(fIntsOn == ASMIntAreEnabled(), ("fIntsOn=%RTbool\n", fIntsOn));
     193#endif
    179194    RT_ASSERT_PREEMPT_CPUID();
    180195}
  • trunk/src/VBox/Runtime/r0drv/solaris/vbi/thread-r0drv-solaris.c

    r28800 r29281  
    3333#include <iprt/thread.h>
    3434
    35 #include <iprt/asm.h>
     35#if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
     36# include <iprt/asm-amd64-x86.h>
     37#endif
    3638#include <iprt/assert.h>
    3739#include <iprt/err.h>
     
    7981    if (!vbi_is_preempt_enabled())
    8082        return false;
     83#if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
    8184    if (!ASMIntAreEnabled())
    8285        return false;
     86#endif
    8387    if (getpil() >= DISP_LEVEL)
    8488        return false;
  • trunk/src/VBox/Runtime/r0drv/solaris/vbi/timer-r0drv-solaris.c

    r28800 r29281  
    170170     */
    171171    RTTimerStop(pTimer);
    172     ASMAtomicWriteU32(pTimer, ~RTTIMER_MAGIC);
     172    ASMAtomicWriteU32(&pTimer->u32Magic, ~RTTIMER_MAGIC);
    173173    RTMemFree(pTimer);
    174174    return VINF_SUCCESS;
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