how to get current cpu id

Yuxin Ren ryx at gwmail.gwu.edu
Thu May 15 01:27:16 CEST 2014


Thank you for your reply.
I understand you. But I still have a question.
How can I know when the thread finish its migration?
In my scenario, master thread creates children threads and then migrate
then to other cores.
It waits until all children finish migration.
The problem is how does master thread guarantee all children finish
migration.

Thank you.


On Wed, May 14, 2014 at 7:14 PM, Adam Lackorzynski <
adam at os.inf.tu-dresden.de> wrote:

> 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                 adam at os.inf.tu-dresden.de
>   Lackorzynski         http://os.inf.tu-dresden.de/~adam/
>
> _______________________________________________
> l4-hackers mailing list
> l4-hackers at os.inf.tu-dresden.de
> http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://os.inf.tu-dresden.de/pipermail/l4-hackers/attachments/20140514/be76a86c/attachment.html>


More information about the l4-hackers mailing list