VirtualBox

Changeset 47457 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Jul 29, 2013 12:52:56 PM (12 years ago)
Author:
vboxsync
Message:

VMM/VMMR0: Missed commit.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/VMMR0.cpp

    r46861 r47457  
    426426    RTLogSetDefaultInstanceThread(NULL, (uintptr_t)pVM->pSession);
    427427    return VINF_SUCCESS;
     428}
     429
     430
     431/**
     432 * Creates R0 thread-context hooks for the current EMT thread.
     433 *
     434 * @returns VBox status code.
     435 *
     436 * @param   pVCpu       Pointer to the VMCPU.
     437 * @thread EMT.
     438 */
     439VMMR0DECL(int) VMMR0ThreadCtxHooksCreate(PVMCPU pVCpu)
     440{
     441    VMCPU_ASSERT_EMT(pVCpu);
     442    Assert(pVCpu->vmm.s.hR0ThreadCtx == NIL_RTTHREADCTX);
     443    int rc = RTThreadCtxHooksCreate(&pVCpu->vmm.s.hR0ThreadCtx);
     444    if (   RT_SUCCESS(rc)
     445        || rc == VERR_NOT_SUPPORTED)
     446    {
     447        return VINF_SUCCESS;
     448    }
     449
     450    Log(("RTThreadCtxHooksCreate failed! rc=%Rrc pVCpu=%p idCpu=%RU32\n", rc, pVCpu, pVCpu->idCpu));
     451    return rc;
     452}
     453
     454
     455/**
     456 * Releases the object reference for the thread-context hook.
     457 *
     458 * @param   pVCpu       Pointer to the VMCPU.
     459 * @remarks Can be called from any thread.
     460 */
     461VMMR0DECL(void) VMMR0ThreadCtxHooksRelease(PVMCPU pVCpu)
     462{
     463    RTThreadCtxHooksRelease(pVCpu->vmm.s.hR0ThreadCtx);
    428464}
    429465
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