qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Proper way to walk through all vpcus
@ 2012-01-28 22:06 Xin Tong
  2012-01-31  8:53 ` 陳韋任
  0 siblings, 1 reply; 2+ messages in thread
From: Xin Tong @ 2012-01-28 22:06 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 311 bytes --]

What is the proper way to iterate over all vcpus in qemu ? below is what i
use in my code. Not sure whether it is the best way, also is a a macro is
qemu to do this ?

      CPUState *curr_cpu = first_cpu;
       for(; curr_cpu != NULL; curr_cpu = curr_cpu->next_cpu) {
               ...
       }

Thanks

Xin

[-- Attachment #2: Type: text/html, Size: 354 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] Proper way to walk through all vpcus
  2012-01-28 22:06 [Qemu-devel] Proper way to walk through all vpcus Xin Tong
@ 2012-01-31  8:53 ` 陳韋任
  0 siblings, 0 replies; 2+ messages in thread
From: 陳韋任 @ 2012-01-31  8:53 UTC (permalink / raw)
  To: Xin Tong; +Cc: qemu-devel

On Sat, Jan 28, 2012 at 05:06:54PM -0500, Xin Tong wrote:
> What is the proper way to iterate over all vcpus in qemu ? below is what i
> use in my code. Not sure whether it is the best way, also is a a macro is
> qemu to do this ?
> 
>       CPUState *curr_cpu = first_cpu;
>        for(; curr_cpu != NULL; curr_cpu = curr_cpu->next_cpu) {
>                ...
>        }

  Seems this is a proper way to iterate all virtual cpus.

Regards,
chenwj

-- 
Wei-Ren Chen (陳韋任)
Computer Systems Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667
Homepage: http://people.cs.nctu.edu.tw/~chenwj

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-01-31  8:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-28 22:06 [Qemu-devel] Proper way to walk through all vpcus Xin Tong
2012-01-31  8:53 ` 陳韋任

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).