[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Proper way to walk through all vpcus
From: |
陳韋任 |
Subject: |
Re: [Qemu-devel] Proper way to walk through all vpcus |
Date: |
Tue, 31 Jan 2012 16:53:33 +0800 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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