VirtualBox

Changeset 24181 in vbox


Ignore:
Timestamp:
Oct 30, 2009 10:51:56 AM (15 years ago)
Author:
vboxsync
Message:

VMM,SUPDrv,IPRT: Always initialize RTSPINLOCKTMP structures.

Location:
trunk/src/VBox
Files:
7 edited

Legend:

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

    r23316 r24181  
    625625
    626626            rc = -EINVAL;
    627             RTR0Term();
     627            RTR0TermForced();
    628628        }
    629629        else
     
    686686     */
    687687    supdrvDeleteDevExt(&g_DevExt);
    688     RTR0Term();
     688    RTR0TermForced();
    689689}
    690690
  • trunk/src/VBox/Runtime/common/misc/cache.cpp

    r21337 r24181  
    195195RTDECL(int) RTCacheRequest(PRTOBJCACHE pCache, void **ppObj)
    196196{
    197     RTSPINLOCKTMP spinlockTmp;
     197    RTSPINLOCKTMP spinlockTmp = RTSPINLOCKTMP_INITIALIZER;
    198198
    199199    if (pCache->SpinlockRequest != NIL_RTSPINLOCK)
     
    264264RTDECL(int) RTCacheInsert(PRTOBJCACHE pCache, void *pObj)
    265265{
    266     RTSPINLOCKTMP spinlockTmp;
     266    RTSPINLOCKTMP spinlockTmp = RTSPINLOCKTMP_INITIALIZER;
    267267    int rc = VINF_SUCCESS;
    268268
  • trunk/src/VBox/Runtime/common/misc/handletable.cpp

    r21337 r24181  
    131131{
    132132    PRTHANDLETABLEINT   pThis;
    133     RTSPINLOCKTMP       Tmp;
     133    RTSPINLOCKTMP       Tmp = RTSPINLOCKTMP_INITIALIZER;
    134134    uint32_t            i1;
    135135    uint32_t            i;
  • trunk/src/VBox/Runtime/common/misc/handletablectx.cpp

    r21337 r24181  
    5050{
    5151    PRTHANDLETABLEINT   pThis;
    52     RTSPINLOCKTMP       Tmp;
     52    RTSPINLOCKTMP       Tmp /*= no init */;
    5353    int                 rc;
    5454
     
    227227    PRTHTENTRYCTX       pEntry;
    228228    PRTHANDLETABLEINT   pThis;
    229     RTSPINLOCKTMP       Tmp;
     229    RTSPINLOCKTMP       Tmp /*= no init */;
    230230
    231231    /* validate the input */
     
    271271    PRTHTENTRYCTX       pEntry;
    272272    PRTHANDLETABLEINT   pThis;
    273     RTSPINLOCKTMP       Tmp;
     273    RTSPINLOCKTMP       Tmp /*= no init */;
    274274
    275275    /* validate the input */
  • trunk/src/VBox/Runtime/common/misc/handletablesimple.cpp

    r21337 r24181  
    6161     * Allocation loop.
    6262     */
    63     RTSPINLOCKTMP Tmp;
     63    RTSPINLOCKTMP Tmp /*= no init */;
    6464    rtHandleTableLock(pThis, &Tmp);
    6565
     
    217217
    218218    /* acquire the lock */
    219     RTSPINLOCKTMP Tmp;
     219    RTSPINLOCKTMP Tmp /*= no init */;
    220220    rtHandleTableLock(pThis, &Tmp);
    221221
     
    258258
    259259    /* acquire the lock */
    260     RTSPINLOCKTMP Tmp;
     260    RTSPINLOCKTMP Tmp /*= no init */;
    261261    rtHandleTableLock(pThis, &Tmp);
    262262
  • trunk/src/VBox/Runtime/r0drv/linux/timer-r0drv-linux.c

    r21337 r24181  
    457457static int rtTimerLnxStartAll(PRTTIMER pTimer, PRTTIMERLINUXSTARTONCPUARGS pArgs)
    458458{
    459     RTSPINLOCKTMP   Tmp;
     459    RTSPINLOCKTMP   Tmp = RTSPINLOCKTMP_INITIALIZER;
    460460    RTCPUID         iCpu;
    461461    RTCPUSET        OnlineSet;
     
    525525static int rtTimerLnxStopAll(PRTTIMER pTimer)
    526526{
     527    RTSPINLOCKTMP   Tmp = RTSPINLOCKTMP_INITIALIZER;
    527528    RTCPUID         iCpu;
    528     RTSPINLOCKTMP   Tmp;
    529529
    530530
     
    587587        &&  pTimer->u32Magic == RTTIMER_MAGIC)
    588588    {
    589         RTSPINLOCKTMP Tmp;
     589        RTSPINLOCKTMP Tmp = RTSPINLOCKTMP_INITIALIZER;
    590590        RTSpinlockAcquire(hSpinlock, &Tmp);
    591591
     
    613613static DECLCALLBACK(void) rtTimerLinuxMpEvent(RTMPEVENT enmEvent, RTCPUID idCpu, void *pvUser)
    614614{
    615     PRTTIMER pTimer = (PRTTIMER)pvUser;
     615    PRTTIMER            pTimer = (PRTTIMER)pvUser;
    616616    PRTTIMERLNXSUBTIMER pSubTimer = &pTimer->aSubTimers[idCpu];
    617     RTSPINLOCK hSpinlock;
    618     RTSPINLOCKTMP Tmp;
     617    RTSPINLOCK          hSpinlock;
     618    RTSPINLOCKTMP       Tmp = RTSPINLOCKTMP_INITIALIZER;
    619619
    620620    Assert(idCpu < pTimer->cCpus);
  • trunk/src/VBox/VMM/VMMR0/PGMR0DynMap.cpp

    r22890 r24181  
    12881288{
    12891289#ifdef VBOX_WITH_STATISTICS
    1290     PVMCPU pVCpu = VMMGetCpu(pVM);
     1290    PVMCPU              pVCpu  = VMMGetCpu(pVM);
    12911291#endif
    1292     RTSPINLOCKTMP   Tmp       = RTSPINLOCKTMP_INITIALIZER;
     1292    RTSPINLOCKTMP       Tmp     = RTSPINLOCKTMP_INITIALIZER;
    12931293    RTSpinlockAcquire(pThis->hSpinlock, &Tmp);
    12941294    AssertMsg(!(HCPhys & PAGE_OFFSET_MASK), ("HCPhys=%RHp\n", HCPhys));
     
    13901390     * Basic pool stuff that doesn't require any lock, just assumes we're a user.
    13911391     */
    1392     PPGMR0DYNMAP    pThis = g_pPGMR0DynMap;
     1392    PPGMR0DYNMAP        pThis      = g_pPGMR0DynMap;
    13931393    if (!pThis)
    13941394        return VINF_SUCCESS;
     
    13991399
    14001400
    1401     int             rc = VINF_SUCCESS;
    1402     RTSPINLOCKTMP   Tmp = RTSPINLOCKTMP_INITIALIZER;
     1401    int                 rc          = VINF_SUCCESS;
     1402    RTSPINLOCKTMP       Tmp        = RTSPINLOCKTMP_INITIALIZER;
    14031403    RTSpinlockAcquire(pThis->hSpinlock, &Tmp);
    14041404
     
    15301530        &&  RT_LIKELY(cEntries <= RT_ELEMENTS(pSet->aEntries)))
    15311531    {
    1532         PPGMR0DYNMAP    pThis = g_pPGMR0DynMap;
    1533         RTSPINLOCKTMP   Tmp = RTSPINLOCKTMP_INITIALIZER;
     1532        PPGMR0DYNMAP    pThis   = g_pPGMR0DynMap;
     1533        RTSPINLOCKTMP   Tmp     = RTSPINLOCKTMP_INITIALIZER;
    15341534        RTSpinlockAcquire(pThis->hSpinlock, &Tmp);
    15351535
     
    16351635            if (i != 0 && RT_LIKELY(i <= RT_ELEMENTS(pSet->aEntries)))
    16361636            {
    1637                 PPGMR0DYNMAP    pThis = g_pPGMR0DynMap;
    1638                 RTSPINLOCKTMP   Tmp = RTSPINLOCKTMP_INITIALIZER;
     1637                PPGMR0DYNMAP    pThis  = g_pPGMR0DynMap;
     1638                RTSPINLOCKTMP   Tmp    = RTSPINLOCKTMP_INITIALIZER;
    16391639                RTSpinlockAcquire(pThis->hSpinlock, &Tmp);
    16401640
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