Changeset 75004 in vbox
- Timestamp:
- Oct 23, 2018 2:43:06 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/VM.cpp
r74786 r75004 117 117 118 118 /** 119 * Do global VMM init.120 *121 * @returns VBox status code.122 */123 VMMR3DECL(int) VMR3GlobalInit(void)124 {125 /*126 * Only once.127 */128 static bool volatile s_fDone = false;129 if (s_fDone)130 return VINF_SUCCESS;131 132 #if defined(VBOX_WITH_DTRACE_R3) && !defined(VBOX_WITH_NATIVE_DTRACE)133 SUPR3TracerRegisterModule(~(uintptr_t)0, "VBoxVMM", &g_VTGObjHeader, (uintptr_t)&g_VTGObjHeader,134 SUP_TRACER_UMOD_FLAGS_SHARED);135 #endif136 137 /*138 * We're done.139 */140 s_fDone = true;141 return VINF_SUCCESS;142 }143 144 145 /**146 119 * Creates a virtual machine by calling the supplied configuration constructor. 147 120 * … … 201 174 202 175 /* 203 * Because of the current hackiness of the applications204 * we'll have to initialize global stuff from here.205 * Later the applications will take care of this in a proper way.206 */207 static bool fGlobalInitDone = false;208 if (!fGlobalInitDone)209 {210 int rc = VMR3GlobalInit();211 if (RT_FAILURE(rc))212 return rc;213 fGlobalInitDone = true;214 }215 216 /*217 176 * Validate input. 218 177 */ … … 237 196 if (RT_SUCCESS(rc)) 238 197 { 198 #if defined(VBOX_WITH_DTRACE_R3) && !defined(VBOX_WITH_NATIVE_DTRACE) 199 /* Now that we've opened the device, we can register trace probes. */ 200 static bool s_fRegisteredProbes = false; 201 if (ASMAtomicCmpXchgBool(&s_fRegisteredProbes, true, false)) 202 SUPR3TracerRegisterModule(~(uintptr_t)0, "VBoxVMM", &g_VTGObjHeader, (uintptr_t)&g_VTGObjHeader, 203 SUP_TRACER_UMOD_FLAGS_SHARED); 204 #endif 205 239 206 /* 240 207 * Call vmR3CreateU in the EMT thread and wait for it to finish.
Note:
See TracChangeset
for help on using the changeset viewer.