VirtualBox

Changeset 6819 in vbox for trunk/include


Ignore:
Timestamp:
Feb 5, 2008 9:52:53 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
27929
Message:

Added VM_ASSERT_EMT_RETURN.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vm.h

    r6796 r6819  
    203203    AssertMsg(VM_IS_EMT(pVM), \
    204204        ("Not emulation thread! Thread=%RTnthrd ThreadEMT=%RTnthrd\n", RTThreadNativeSelf(), pVM->NativeThreadEMT))
     205#endif
     206
     207
     208/** @def VM_ASSERT_EMT_RETURN
     209 * Asserts that the current thread IS the emulation thread (EMT) and returns if it isn't.
     210 */
     211#ifdef IN_GC
     212# define VM_ASSERT_EMT_RETURN(pVM, rc)  AssertReturn(VM_IS_EMT(pVM), (rc))
     213#elif defined(IN_RING0)
     214# define VM_ASSERT_EMT_RETURN(pVM, rc)  AssertReturn(VM_IS_EMT(pVM), (rc))
     215#else
     216# define VM_ASSERT_EMT_RETURN(pVM, rc) \
     217    AssertMsgReturn(VM_IS_EMT(pVM), \
     218        ("Not emulation thread! Thread=%RTnthrd ThreadEMT=%RTnthrd\n", RTThreadNativeSelf(), pVM->NativeThreadEMT), \
     219        (rc))
    205220#endif
    206221
Note: See TracChangeset for help on using the changeset viewer.

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