Changeset 74793 in vbox
- Timestamp:
- Oct 12, 2018 10:58:34 AM (6 years ago)
- File:
-
- 1 edited
-
trunk/include/VBox/vmm/vm.h (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/vm.h
r74792 r74793 625 625 * @param fFlag The flag to set. 626 626 */ 627 #if 1 628 # if !defined(VBOX_STRICT) || !defined(RT_COMPILER_SUPPORTS_LAMBDA) 629 # define VM_FF_SET(pVM, fFlag) ASMAtomicOrU32(&(pVM)->fGlobalForcedActions, (fFlag)) 630 # else 631 # define VM_FF_SET(pVM, fFlag) \ 632 ([](PVM a_pVM) -> void \ 633 { \ 634 AssertCompile(RT_IS_POWER_OF_TWO(fFlag)); \ 635 ASMAtomicOrU32(&a_pVM->fGlobalForcedActions, (fFlag)); \ 636 }(pVM)) 637 # endif 638 #else 639 # define VM_FF_SET(pVM, fFlag) \ 640 do { ASMAtomicOrU32(&(pVM)->fGlobalForcedActions, (fFlag)); \ 641 RTLogPrintf("VM_FF_SET : %08x %s - %s(%d) %s\n", (pVM)->fGlobalForcedActions, #fFlag, __FILE__, __LINE__, __FUNCTION__); \ 642 } while (0) 643 #endif 627 #define VM_FF_SET(pVM, fFlag) \ 628 do { AssertCompile(RT_IS_POWER_OF_TWO(fFlag)); ASMAtomicOrU32(&(pVM)->fGlobalForcedActions, (fFlag)); } while (0) 644 629 645 630 /** @def VMCPU_FF_SET … … 650 635 * @sa VMCPU_FF_SET_MASK 651 636 */ 652 #if !defined(VBOX_STRICT) || !defined(RT_COMPILER_SUPPORTS_LAMBDA) 653 # define VMCPU_FF_SET(pVCpu, fFlag) ASMAtomicOrU32(&(pVCpu)->fLocalForcedActions, (fFlag)) 654 #else 655 # define VMCPU_FF_SET(pVCpu, fFlag) \ 656 ([](PVMCPU a_pVCpu) -> void \ 657 { \ 658 AssertCompile(RT_IS_POWER_OF_TWO(fFlag)); \ 659 ASMAtomicOrU32(&a_pVCpu->fLocalForcedActions, (fFlag)); \ 660 }(pVCpu)) 661 #endif 637 #define VMCPU_FF_SET(pVCpu, fFlag) \ 638 do { AssertCompile(RT_IS_POWER_OF_TWO(fFlag)); ASMAtomicOrU32(&(pVCpu)->fLocalForcedActions, (fFlag)); } while (0) 662 639 663 640 /** @def VMCPU_FF_SET … … 668 645 * @sa VMCPU_FF_SET 669 646 */ 670 #define VMCPU_FF_SET_MASK(a_pVCpu, fFlags) ASMAtomicOrU32(&a_pVCpu->fLocalForcedActions, (fFlags)) 647 #define VMCPU_FF_SET_MASK(a_pVCpu, fFlags) \ 648 do { ASMAtomicOrU32(&a_pVCpu->fLocalForcedActions, (fFlags)); } while (0) 671 649 672 650 /** @def VM_FF_CLEAR … … 676 654 * @param fFlag The flag to clear. 677 655 */ 678 #if 1 679 # if !defined(VBOX_STRICT) || !defined(RT_COMPILER_SUPPORTS_LAMBDA) 680 # define VM_FF_CLEAR(pVM, fFlag) ASMAtomicAndU32(&(pVM)->fGlobalForcedActions, ~(fFlag)) 681 # else 682 # define VM_FF_CLEAR(pVM, fFlag) \ 683 ([](PVM a_pVM) -> void \ 684 { \ 685 AssertCompile(RT_IS_POWER_OF_TWO(fFlag)); \ 686 ASMAtomicAndU32(&a_pVM->fGlobalForcedActions, ~(fFlag)); \ 687 }(pVM)) 688 # endif 689 #else 690 # define VM_FF_CLEAR(pVM, fFlag) \ 691 do { ASMAtomicAndU32(&(pVM)->fGlobalForcedActions, ~(fFlag)); \ 692 RTLogPrintf("VM_FF_CLEAR: %08x %s - %s(%d) %s\n", (pVM)->fGlobalForcedActions, #fFlag, __FILE__, __LINE__, __FUNCTION__); \ 693 } while (0) 694 #endif 656 #define VM_FF_CLEAR(pVM, fFlag) \ 657 do { AssertCompile(RT_IS_POWER_OF_TWO(fFlag)); ASMAtomicAndU32(&(pVM)->fGlobalForcedActions, ~(fFlag)); } while (0) 695 658 696 659 /** @def VMCPU_FF_CLEAR … … 700 663 * @param fFlag The flag to clear. 701 664 */ 702 #if !defined(VBOX_STRICT) || !defined(RT_COMPILER_SUPPORTS_LAMBDA) 703 # define VMCPU_FF_CLEAR(pVCpu, fFlag) ASMAtomicAndU32(&(pVCpu)->fLocalForcedActions, ~(fFlag)) 704 #else 705 # define VMCPU_FF_CLEAR(pVCpu, fFlag) \ 706 ([](PVMCPU a_pVCpu) -> void \ 707 { \ 708 AssertCompile(RT_IS_POWER_OF_TWO(fFlag)); \ 709 ASMAtomicAndU32(&a_pVCpu->fLocalForcedActions, ~(fFlag)); \ 710 }(pVCpu)) 711 #endif 665 #define VMCPU_FF_CLEAR(pVCpu, fFlag) \ 666 do { AssertCompile(RT_IS_POWER_OF_TWO(fFlag)); ASMAtomicAndU32(&(pVCpu)->fLocalForcedActions, ~(fFlag)); } while (0) 712 667 713 668 /** @def VMCPU_FF_CLEAR_MASK … … 717 672 * @param fFlags The flags to clear. 718 673 */ 719 #define VMCPU_FF_CLEAR_MASK(pVCpu, fFlags) ASMAtomicAndU32(&(pVCpu)->fLocalForcedActions, ~(fFlags)) 674 #define VMCPU_FF_CLEAR_MASK(pVCpu, fFlags) \ 675 do { ASMAtomicAndU32(&(pVCpu)->fLocalForcedActions, ~(fFlags)); } while (0) 720 676 721 677 /** @def VM_FF_IS_SET
Note:
See TracChangeset
for help on using the changeset viewer.

