lkml.org 
[lkml]   [2010]   [Dec]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH] Read THREAD_CPUTIME clock from other processes.
    From
    Date
    On Thu, 2010-12-23 at 18:38 +0100, Dario Faggioli wrote: 
    > > > rcu_read_lock();
    > > > p = find_task_by_vpid(pid);
    > > > - if (!p || !(CPUCLOCK_PERTHREAD(which_clock) ?
    > > > - same_thread_group(p, current) : has_group_leader_pid(p))) {
    > > > + if (!p)
    > > > error = -EINVAL;
    > > > - }
    > >
    > > This changes the behaviour of sys_clock_settime(). Probably doesn't
    > > matter since it does nothing, but perhaps !CPUCLOCK_PERTHREAD &&
    > > !group_leader should result in -EINAVL as before.
    > >
    > Oops, sure, you're right, I can fix this. :-)
    >
    Mmm... This is trickier than I remembered expected. Apparently, glibc
    always gives us a !CPUCLOCK_PERTHREAD() clockid, since it uses
    MAKE_PROCESS_CLOCK() when clock_cpugetclockid is called.

    Therefore, the take two of this thing will be a little different from
    this first posting...

    Thanks and Regards,
    Dario

    --
    <<This happens because I choose it to happen!>> (Raistlin Majere)
    ----------------------------------------------------------------------
    Dario Faggioli, ReTiS Lab, Scuola Superiore Sant'Anna, Pisa (Italy)

    http://retis.sssup.it/people/faggioli -- dario.faggioli@jabber.org

    [unhandled content-type:application/pgp-signature]
    \
     
     \ /
      Last update: 2010-12-24 12:39    [W:0.022 / U:1.068 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site