VirtualBox

Changeset 57376 in vbox


Ignore:
Timestamp:
Aug 17, 2015 11:42:19 AM (9 years ago)
Author:
vboxsync
Message:

VMR3SetError[V]: Take shortcut when called on EMT, allowing it early during VM creation. Don't require a VM structure to be present, just the UVM.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/VM.cpp

    r57358 r57376  
    38323832 * @thread  Any thread.
    38333833 */
    3834 static int vmR3SetErrorU(PUVM pUVM, int rc, RT_SRC_POS_DECL, const char *pszFormat, ...)
     3834static int vmR3SetErrorU(PUVM pUVM, int rc, RT_SRC_POS_DECL, const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(6, 7)
    38353835{
    38363836    va_list va;
     
    39393939{
    39403940    UVM_ASSERT_VALID_EXT_RETURN(pUVM, VERR_INVALID_VM_HANDLE);
     3941
     3942    /* Take shortcut when called on EMT, skipping VM handle requirement + validation. */
     3943    if (VMR3GetVMCPUThread(pUVM) != NIL_RTTHREAD)
     3944    {
     3945        vmR3SetErrorUV(pUVM, rc, RT_SRC_POS_ARGS, pszFormat, &va);
     3946        return rc;
     3947    }
     3948
    39413949    VM_ASSERT_VALID_EXT_RETURN(pUVM->pVM, VERR_INVALID_VM_HANDLE);
    39423950    return VMSetErrorV(pUVM->pVM, rc, pszFile, iLine, pszFunction, pszFormat, va);
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