Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 48607
b: refs/heads/master
c: 1f2ea08
h: refs/heads/master
i:
  48605: 6d5d51d
  48603: 553dd45
  48599: 3c3e4ad
  48591: 974edcd
  48575: 949a613
v: v3
  • Loading branch information
Paul E. McKenney authored and Linus Torvalds committed Feb 16, 2007
1 parent 4ecc633 commit 86e2955
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7460ed2844ffad7141e30271c0c3da8336e66014
refs/heads/master: 1f2ea0837dbc263ce2a2512c4e73c83df68a6a55
15 changes: 10 additions & 5 deletions trunk/kernel/posix-cpu-timers.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,20 +304,25 @@ int posix_cpu_clock_get(const clockid_t which_clock, struct timespec *tp)
* should be able to see it.
*/
struct task_struct *p;
read_lock(&tasklist_lock);
rcu_read_lock();
p = find_task_by_pid(pid);
if (p) {
if (CPUCLOCK_PERTHREAD(which_clock)) {
if (p->tgid == current->tgid) {
error = cpu_clock_sample(which_clock,
p, &rtn);
}
} else if (p->tgid == pid && p->signal) {
error = cpu_clock_sample_group(which_clock,
p, &rtn);
} else {
read_lock(&tasklist_lock);
if (p->tgid == pid && p->signal) {
error =
cpu_clock_sample_group(which_clock,
p, &rtn);
}
read_unlock(&tasklist_lock);
}
}
read_unlock(&tasklist_lock);
rcu_read_unlock();
}

if (error)
Expand Down

0 comments on commit 86e2955

Please sign in to comment.