Changeset 19405 in vbox
- Timestamp:
- May 5, 2009 11:28:47 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 46919
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/types.h
r19300 r19405 112 112 #define NIL_VMCPUID UINT32_C(0xfffffffd) 113 113 /** @} */ 114 115 /** 116 * Virtual CPU set. 117 */ 118 typedef struct VMCPUSET 119 { 120 /** The bitmap data. */ 121 uint32_t au32Bitmap[256/32]; 122 } VMCPUSET; 123 /** Pointer to a Virtual CPU set. */ 124 typedef VMCPUSET *PVMCPUSET; 125 /** Pointer to a const Virtual CPU set. */ 126 typedef VMCPUSET const *PCVMCPUSET; 127 128 /** Tests if a valid CPU ID is present in the set.. */ 129 #define VMCPUSET_IS_PRESENT(pSet, idCpu) ASMBitTest( &(pSet)->au32Bitmap, (idCpu)) 130 /** Adds a CPU to the set. */ 131 #define VMCPUSET_ADD(pSet, idCpu) ASMBitSet( &(pSet)->au32Bitmap, (idCpu)) 132 /** Deletes a CPU from the set. */ 133 #define VMCPUSET_DEL(pSet, idCpu) ASMBitClear(&(pSet)->au32Bitmap, (idCpu)) 134 /** Empties the set. */ 135 #define VMCPUSET_EMPTY(pSet, idCpu) memset(&(pSet)->au32Bitmap, '\0', sizeof((pSet)->au32Bitmap)) 136 /** Filles the set. */ 137 #define VMCPUSET_FILL(pSet, idCpu) memset(&(pSet)->au32Bitmap, 0xff, sizeof((pSet)->au32Bitmap)) 138 /** Filles the set. */ 139 #define VMCPUSET_IS_EQUAL(pSet1, pSet2) (memcmp(&(pSet1)->au32Bitmap, &(pSet2)->au32Bitmap, sizeof((pSet1)->au32Bitmap)) == 0) 114 140 115 141 -
trunk/src/VBox/VMM/testcase/tstVMStructSize.cpp
r19366 r19405 299 299 CHECK_MEMBER_ALIGNMENT(HWACCMCPU, Event.intInfo, 8); 300 300 301 /* Make sure the set is large enough and has the correct size. */ 302 CHECK_SIZE(VMCPUSET, 32); 303 if (sizeof(VMCPUSET) * 8 < VMM_MAX_CPU_COUNT) 304 { 305 printf("error: VMCPUSET is too small for VMM_MAX_CPU_COUNT=%u!\n", VMM_MAX_CPU_COUNT); 306 rc++; 307 } 301 308 302 309 /*
Note:
See TracChangeset
for help on using the changeset viewer.