VirtualBox

忽略:
時間撮記:
2008-11-4 下午04:12:57 (16 年 以前)
作者:
vboxsync
訊息:

Moving data around

檔案:
修改 1 筆資料

圖例:

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

    r12989 r13791  
    3030#include <VBox/vm.h>
    3131#include <VBox/err.h>
     32#include <VBox/hwaccm.h>
    3233
    3334#include <VBox/log.h>
     
    6768    Assert(pVM);
    6869
    69     /*
    70      * Try take the lock.
     70    RTCPUID idCPU = VM_GET_VMCPUID(pVM);
     71
     72    /*
     73     * Try to take the lock.
    7174     */
    7275    if (ASMAtomicCmpXchgS32(&pCritSect->s.Core.cLockers, 0, -1))
    7376    {
    7477        pCritSect->s.Core.cNestings = 1;
    75         ASMAtomicXchgSize(&pCritSect->s.Core.NativeThreadOwner, pVM->NativeThreadEMT);
     78        Assert(pVM->aCpu[idCPU].hNativeThread);
     79        ASMAtomicXchgSize(&pCritSect->s.Core.NativeThreadOwner, pVM->aCpu[idCPU].hNativeThread);
    7680        STAM_PROFILE_ADV_START(&pCritSect->s.StatLocked, l);
    7781        return VINF_SUCCESS;
     
    8185     * Nested?
    8286     */
    83     if (pCritSect->s.Core.NativeThreadOwner == pVM->NativeThreadEMT)
     87    if (pCritSect->s.Core.NativeThreadOwner == pVM->aCpu[idCPU].hNativeThread)
    8488    {
    8589        pCritSect->s.Core.cNestings++;
     
    159163    PVM pVM = pCritSect->s.CTX_SUFF(pVM);
    160164    Assert(pVM);
    161     Assert(pCritSect->s.Core.NativeThreadOwner == pVM->NativeThreadEMT);
     165    AssertMsg(pCritSect->s.Core.NativeThreadOwner == pVM->aCpu[VM_GET_VMCPUID(pVM)].hNativeThread, ("Owner %RX64 emt=%RX64\n", pCritSect->s.Core.NativeThreadOwner, pVM->aCpu[VM_GET_VMCPUID(pVM)].hNativeThread));
    162166
    163167    /*
     
    183187
    184188        /* darn, someone raced in on us. */
    185         ASMAtomicXchgSize(&pCritSect->s.Core.NativeThreadOwner, pVM->NativeThreadEMT);
     189        Assert(pVM->aCpu[VM_GET_VMCPUID(pVM)].hNativeThread);
     190        ASMAtomicXchgSize(&pCritSect->s.Core.NativeThreadOwner, pVM->aCpu[VM_GET_VMCPUID(pVM)].hNativeThread);
    186191        STAM_PROFILE_ADV_START(&pCritSect->s.StatLocked, l);
    187192    }
     
    217222    PVM pVM = pCritSect->s.CTX_SUFF(pVM);
    218223    Assert(pVM);
    219     return pCritSect->s.Core.NativeThreadOwner == pVM->NativeThreadEMT;
     224    return pCritSect->s.Core.NativeThreadOwner == pVM->aCpu[VM_GET_VMCPUID(pVM)].hNativeThread;
    220225#endif
    221226}
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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