|
RE: Make a process run on only one CPU
|
05/27/2011 11:17 PM
post86232
|
RE: Make a process run on only one CPU
Or use the program "on" to launch your application.
-----Message d'origine-----
De : Elena Laskavaia [mailto:community-noreply@qnx.com]
Envoyé : 27 mai 2011 23:07
À : momentics-community
Objet : Re: Make a process run on only one CPU
ThreadCtl(_NTO_TCTL_RUNMASK, mask)
Where mask is a bitfield of which cpus the thread is allowed to run on.
On 27/05/2011 8:14 PM, Rodrigo Campos wrote:
> Hi,
>
> I'm using QNX 6.5 and I want to make my program run on only one CPU (it uses pthreads). Does anybody knows how to do
that ?
>
> I've been looking though QNX 6.5 docn with "cpu affinity", taskset and that stuff, but I don not find anything.
>
>
>
> Thanks!
> Rodrigo
>
>
>
> _______________________________________________
>
> QNX Momentics Community Support
> http://community.qnx.com/sf/go/post86229
>
_______________________________________________
QNX Momentics Community Support
http://community.qnx.com/sf/go/post86231
|
|
|
|
Re: Make a process run on only one CPU
|
06/03/2011 11:57 PM
post86434
|
Re: Make a process run on only one CPU
It should be noted that this will only set the calling thread's
runmask. If you want other threads to have the
same restriction, then you should set the runmask within those threads too.
As an alternative, you can use the _NTO_TCTL_RUNMASK_GET_AND_SET_INHERIT
threadctl to set the current
thread's runmask in a way that it will be inherited by any future
threads created.
On 11-05-27 8:07 PM, Elena Laskavaia wrote:
> ThreadCtl(_NTO_TCTL_RUNMASK, mask)
>
> Where mask is a bitfield of which cpus the thread is allowed to run on.
>
>
> On 27/05/2011 8:14 PM, Rodrigo Campos wrote:
>> Hi,
>>
>> I'm using QNX 6.5 and I want to make my program run on only one CPU (it uses pthreads). Does anybody knows how to do
that ?
>>
>> I've been looking though QNX 6.5 docn with "cpu affinity", taskset and that stuff, but I don not find anything.
>>
>>
>>
>> Thanks!
>> Rodrigo
>>
>>
>>
>> _______________________________________________
>>
>> QNX Momentics Community Support
>> http://community.qnx.com/sf/go/post86229
>>
>
>
>
>
> _______________________________________________
>
> QNX Momentics Community Support
> http://community.qnx.com/sf/go/post86231
>
--
cburgess@qnx.com
|
|
|