Re: how to get current cpu id

Adam Lackorzynski <[email protected]>
Newsgroups gmane.comp.micro-kernel.l4.devel
Message-ID <[email protected]>
On Tue May 13, 2014 at 17:05:34 -0800, Yuxin Ren wrote:
> How can I get the id of cpu(core) the current thread is running on?

The system does not do migrate threads between CPUs on its own, so your
program is running on CPU0. And from that point (in a simple scenario)
programs control themselves where they migrate to, so they know where
they are running on.


Adam
-- 
Adam                 [email protected]
  Lackorzynski         http://os.inf.tu-dresden.de/~adam/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.