VirtualBox

Ignore:
Timestamp:
Sep 1, 2014 2:48:33 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
95812
Message:

HostDrivers/solaris, Runtime/r0drv: Fix calling RTThreadPreemptIs* too early on Solaris.

File:
1 edited

Legend:

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

    r41946 r52553  
    139139    AssertReturn(fFlags == 0, VERR_INVALID_PARAMETER);
    140140    AssertPtrReturn(phKrnlInfo, VERR_INVALID_POINTER);
    141     RT_ASSERT_PREEMPTIBLE();
     141    /* This can be called as part of IPRT init, in which case we have no thread preempt information yet. */
     142    if (g_frtSolInitDone)
     143        RT_ASSERT_PREEMPTIBLE();
    142144
    143145    *phKrnlInfo = NIL_RTDBGKRNLINFO;
     
    182184    AssertPtrReturn(pThis, UINT32_MAX);
    183185    AssertMsgReturn(pThis->u32Magic == RTDBGKRNLINFO_MAGIC, ("%p: u32Magic=%RX32\n", pThis, pThis->u32Magic), UINT32_MAX);
    184     RT_ASSERT_PREEMPTIBLE();
     186    if (g_frtSolInitDone)
     187        RT_ASSERT_PREEMPTIBLE();
    185188
    186189    uint32_t cRefs = ASMAtomicDecU32(&pThis->cRefs);
     
    204207    AssertPtrReturn(pszStructure, VERR_INVALID_PARAMETER);
    205208    AssertPtrReturn(poffMember, VERR_INVALID_PARAMETER);
    206     RT_ASSERT_PREEMPTIBLE();
     209    if (g_frtSolInitDone)
     210        RT_ASSERT_PREEMPTIBLE();
    207211
    208212    int rc = VERR_NOT_FOUND;
     
    232236    AssertPtrNullReturn(ppvSymbol, VERR_INVALID_PARAMETER);
    233237    AssertReturn(!pszModule, VERR_MODULE_NOT_FOUND);
    234     RT_ASSERT_PREEMPTIBLE();
     238    if (g_frtSolInitDone)
     239        RT_ASSERT_PREEMPTIBLE();
    235240
    236241    uintptr_t uValue = kobj_getsymvalue((char *)pszSymbol, 1 /* only kernel */);
Note: See TracChangeset for help on using the changeset viewer.

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