Patch for pthread get and set affinity

Gedare Bloom gedare at rtems.org
Thu Feb 27 15:41:57 UTC 2014


Nevermind, you would not gain anything by what I was recommending.
What I was saying is that this patch implements
pthread_setaffinity_np(). You could have it call
pthread_attr_setaffinity_np() instead of directly writing to
api->Attributes, e.g. replace
CPU_COPY( api->Attributes.affinityset, cpuset );
with
pthread_attr_setaffinity_np(&api->Attributes, cpusetsize, cpuset);
But, all you get is the same error checking you already do in the
pthread_setaffinity_np function.

-Gedare

On Thu, Feb 27, 2014 at 10:30 AM, Jennifer Averett
<Jennifer.Averett at oarcorp.com> wrote:
> I'm sorry I don't follow this question.  This patch is the
> Implementation and test of pthread_attr_setaffinity_np.
> Am I missing something?  The method sets the api->Attributes affinity.
>
>> -----Original Message-----
>> From: gedare at gwmail.gwu.edu [mailto:gedare at gwmail.gwu.edu] On
>> Behalf Of Gedare Bloom
>> Sent: Thursday, February 27, 2014 9:17 AM
>> To: Jennifer Averett
>> Cc: rtems-devel at rtems.org
>> Subject: Re: Patch for pthread get and set affinity
>>
>> Same comments from my email on the other thread apply here. Why don't
>> you use the pthread_attr_setaffinity_np() to set the api->Attributes affinity?
>> -Gedare
>>
>> On Thu, Feb 27, 2014 at 8:28 AM, Jennifer Averett
>> <Jennifer.Averett at oarcorp.com> wrote:
>> >
>> > Attached are patches for pthread get and set affinity, as well as a
>> > test for the new functions.
>> >
>> > Jennifer Averett
>> > On-Line Applications Research
>> > _______________________________________________
>> > rtems-devel mailing list
>> > rtems-devel at rtems.org
>> > http://www.rtems.org/mailman/listinfo/rtems-devel
>> >



More information about the devel mailing list