lkml.org 
[lkml]   [2008]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC] Per-thread getrusage
Date
Pavel Emelyanov <xemul@openvz.org> writes:
>> ...
>> +asmlinkage long sys_thread_getrusage(int tid, struct rusage __user *ru)
>> +{
>> + struct task_struct *tsk;
>> + tsk = find_task_by_pid(tid);
>> + return getrusage(tsk, RUSAGE_THREAD, ru);
>> +}
>
> Well, the find_task_by_pid() is really wrong here.

And find_task_by_pid should probably just be removed.

No need to provide function with the gun firmly pointed at our feet....

Eric


\
 
 \ /
  Last update: 2008-01-28 21:49    [W:0.159 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site