VirtualBox

Changeset 52553 in vbox


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

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

Location:
trunk/src/VBox
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/solaris/SUPDrv-solaris.c

    r52192 r52553  
    201201int _init(void)
    202202{
     203#if 0    /* No IPRT logging before RTR0Init() is done! */
    203204    LogFlowFunc(("vboxdrv:_init\n"));
     205#endif
    204206
    205207    /*
     
    210212        pModCtl->mod_loadflags |= MOD_NOAUTOUNLOAD;
    211213    else
    212         LogRel(("vboxdrv: failed to disable autounloading!\n"));
     214        cmn_err(CE_NOTE, "vboxdrv: failed to disable autounloading!\n");
    213215
    214216    /*
     
    300302int _info(struct modinfo *pModInfo)
    301303{
    302     LogFlowFunc(("vboxdrv:_info\n"));
     304#if 0    /* No IPRT logging before RTR0Init() is done! And yes this is called before _init()!*/
     305    LogFlowFunc(("vboxdrv:_init\n"));
     306#endif
    303307    int e = mod_info(&g_VBoxDrvSolarisModLinkage, pModInfo);
    304308    return e;
  • trunk/src/VBox/Runtime/r0drv/initterm-r0drv.cpp

    r48935 r52553  
    6767    uint32_t cNewUsers;
    6868    Assert(fReserved == 0);
     69#ifndef RT_OS_SOLARIS       /* On Solaris our thread preemption information is only obtained in rtR0InitNative().*/
    6970    RT_ASSERT_PREEMPTIBLE();
     71#endif
    7072
    7173    /*
  • 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.

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