Question about set/get cpu affinity tool by Robert love.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All,

   I am trying to compile the cpu affinity tool written by Robert love present at the below link:
  
   http://www.linuxjournal.com/files/linuxjournal.com/linuxjournal/articles/067/6799/6799l1.html

   But if I try to compile the program its giving me following error:

   vipul@ubuntu:~/linux$ cc -o bind bind.c
   bind.c: In function `main':
   bind.c:29: warning: passing arg 3 of `sched_getaffinity' from incompatible pointer type
   bind.c:37: warning: passing arg 3 of `sched_setaffinity' from incompatible pointer type
   bind.c:42: warning: passing arg 3 of `sched_getaffinity' from incompatible pointer type

   I am not sure why? (looking at his explanation and code things look perfect).
   http://www.linuxjournal.com/files/linuxjournal.com/linuxjournal/articles/067/6799

   Also, Second thing he mentions sched_get/setaffinity takes three args but after doing the cscope
   in kernel source I found that its taking 2 args only.
   [cut from kernel/sched.c]
   long sched_getaffinity(pid_t pid, struct cpumask *mask)

    I was wondering if any body could please help me with this issue, would like to run this tool and
    set/check cpu affinity.

Regards,
Vipul.


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux