VirtualBox

忽略:
時間撮記:
2008-5-7 下午06:13:32 (17 年 以前)
作者:
vboxsync
訊息:

Fixed lock accounting for locks aquired via VMM[GC|R0]CallHost.

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/VMM/VMMAll/PDMAllCritSect.cpp

    r8155 r8677  
    3636#ifdef IN_RING3
    3737# include <iprt/semaphore.h>
    38 #endif 
    39 
    40 
    41 /**
    42  * Leaves a critical section entered with PDMCritSectEnter().
     38#endif
     39
     40
     41/**
     42 * Enters a PDM critical section.
    4343 *
    4444 * @returns VINF_SUCCESS if entered successfully.
     
    9696#endif
    9797}
     98
     99
     100#ifdef IN_RING3
     101/**
     102 * Enters a PDM critical section.
     103 *
     104 * @returns VINF_SUCCESS if entered successfully.
     105 * @returns rcBusy when encountering a busy critical section in GC/R0.
     106 * @returns VERR_SEM_DESTROYED if the critical section is dead.
     107 *
     108 * @param   pCritSect           The PDM critical section to enter.
     109 * @param   fCallHost           Whether this is a VMMGCCallHost() or VMMR0CallHost() request.
     110 */
     111PDMR3DECL(int) PDMR3CritSectEnterEx(PPDMCRITSECT pCritSect, bool fCallHost)
     112{
     113    int rc = PDMCritSectEnter(pCritSect, VERR_INTERNAL_ERROR);
     114    if (    rc == VINF_SUCCESS
     115        &&  fCallHost
     116        &&  pCritSect->s.Core.Strict.ThreadOwner != NIL_RTTHREAD)
     117    {
     118        RTThreadWriteLockDec(pCritSect->s.Core.Strict.ThreadOwner);
     119        ASMAtomicUoWriteSize(&pCritSect->s.Core.Strict.ThreadOwner, NIL_RTTHREAD);
     120    }
     121    return rc;
     122}
     123#endif /* IN_RING3 */
    98124
    99125
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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