[fpc-pascal] Re: GetAffinity\SetAffinity
Brian
vmst at golden.net
Fri Nov 15 04:35:05 CET 2013
Alexey Voytsehovich wrote
> Just a huge thank you:)
>
> 2011/1/21 <
> michael.vancanneyt@
> >:
>>
>>
>> See
>> man sched_setaffinity
>> for the call to do this.
>>
>> Free Pascal does not have this call predefined, but you can make this
>> call.
>>
>>
>> Using the do_syscall you should be able to set up the call to the kernel.
>>
>> Something like:
>>
>> do_Syscall(syscall_nr_sched_setaffinity,fpgetpid,setsize, at cpu_set);
>>
>> Michael.
>>
>> On Fri, 21 Jan 2011, Alexey Voychehovich wrote:
>>
>>> Good day.
>>> There is a need to establish some process affinity using free pascal
>>> and ubuntu. Do not tell that on this occasion you can read?
>>>
>>> Thanks in advance
>>> _______________________________________________
>>> fpc-pascal maillist -
> fpc-pascal at .freepascal
>>> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>>>
>> _______________________________________________
>> fpc-pascal maillist -
> fpc-pascal at .freepascal
>> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>>
>
>
>
> --
> Don`t drink and drive, smoke and fly!
> _______________________________________________
> fpc-pascal maillist -
> fpc-pascal at .freepascal
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Request for additional info :
do_Syscall(syscall_nr_sched_setaffinity,fpgetpid,setsize, at cpu_set);
The above generalized suggestion is very helpful , but can someone provide
or point me to a link which describes the type cpu_set_t which @cpu_set
points to.
sched.h doesn't really explain the type definition or how to use it.
Many thanks in advance.
Brian
--
View this message in context: http://free-pascal-general.1045716.n5.nabble.com/GetAffinity-SetAffinity-tp3351231p5717501.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.
More information about the fpc-pascal
mailing list