[vbox-dev] Best way to identify the VM id in the Virtual Box Source code

Knut St. Osmundsen knut.osmundsen at oracle.com
Thu Jul 22 22:11:38 GMT 2010


Suk Kyu Lee wrote:
> Hello,
> 
> I was wondering if there is a way to find the distinct ID for the EMT
> thread within the VM or the VM id within the Virtual Box source code.
> 
> I was playing around with the vm.h to add the id but somehow didn't work.
> 
> I was hoping if there is a way to find the unique id for the EMT thread
> or the VM structure within the Virtual Box.

Do you mean something like what 'ps -eL' returns in the 'LWP' column on
linux, then this information is encapsulated in by the IPRT
(include/iprt/thread.h, src/VBox/Runtime/) and the pthreads library.
The native handle (pthread_t on *nix) of an EMT can be found in
VMCPU::hNativeThread (VM::aCpus[idCpu].hNativeThread).


--

Kind regards / Mit freundlichen Gruessen / Vennlig hilsen,
  bird

--

ORACLE Deutschland B.V. & Co. KG  Knut St. Osmundsen
Werkstrasse 24                    Senior Staff Engineer, VirtualBox
71384 Weinstadt, Germany          mailto:bird at sun.com

Hauptverwaltung: Riesstr. 25, D-80992 Muenchen
Registergericht: Amtsgericht Muenchen, HRA 95603

Komplementaerin: ORACLE Deutschland Verwaltung B.V.
Rijnzathe 6, 3454PV De Meern, Niederlande
Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
Geschaeftsfuehrer: J. Kunz, M. van de Molen, A. van der Ven






More information about the vbox-dev mailing list