OpenVZ Forum


Home » Mailing lists » Users » find_task_by_pid macro removed from kernel
Re: find_task_by_pid macro removed from kernel [message #6473 is a reply to message #6455] Mon, 18 September 2006 12:59 Go to previous messageGo to previous message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Matteo Pillon wrote:
> Hi all,
>
> I had troubles getting lirc modules working on openvz kernel: lirc_dev
> needs find_task_by_pid (modprobe lirc_dev returns an unresolved
> symbol).
> On a vanilla kernel this is defined as a macro:
> #define find_task_by_pid(nr) find_task_by_pid_type(PIDTYPE_PID, nr)
> On openvz kernel (I'm running 2.6.16-026test017), this macro has been
> removed, I can only find:
> #define find_task_by_pid_all(nr) \
> find_task_by_pid_type_all(PIDTYPE_PID, nr)
> Why find_task_by_pid has been removed? In which ways
> find_task_by_pid_all differs?
>
find_task_by_pid_all() seeks among all tasks on HW
find_task_by_pid_ve() seeks among all task in VE
The reason of appearance of these functions in OpenVZ environment is
clear, I suppose.
> I tried replacing find_task_by_pid(ir->tpid) in lirc source-code with
> find_task_by_pid_type(PIDTYPE_PID, ir->tpid), and it works flawlessly.
>
Better way is to use find_task_by_pid_all() or find_task_by_pid_ve().
What particular
function to use depends on context.
> Does this have any drawback? If not, why not reincluding
> find_task_by_pid into the kernel to keep compatibility?
>
>
> Thanks for replies.
>
> Bye.
>
>
HTH,
vass
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to reset UBC failcnt
Next Topic: Patches for the latest kernel version
Goto Forum:
  


Current Time: Fri Nov 15 14:09:36 GMT 2024

Total time taken to generate the page: 0.06203 seconds