Re: Thread Affinity structure

From: Christoph Lameter
Date: Fri Feb 04 2011 - 15:13:19 EST


On Fri, 4 Feb 2011, Sri Ram Vemulpali wrote:

> Hi Christoph,
>
> Thanks for response. Can you please explain in little bit elaborate
> what do you mean
>
> "The value returned  from a call to gettid(2) can be passed in the argument
> pid.  Specifying pid as 0 will set the attribute for the calling thread,
> and passing the value returned from a call to getpid(2) will set the
> attribute for the main thread of the thread group."
>
> To whom I should pass the id. I did not understood.

The passage was from the man page that you get by typing

man sched_setaffinity


You pass the id as a parameter to sched_setaffinity.