Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 277199
b: refs/heads/master
c: 3424069
h: refs/heads/master
i:
  277197: 0e4c908
  277195: 3830ca0
  277191: 0f2966f
  277183: dba1611
v: v3
  • Loading branch information
Paul E. McKenney authored and Paul E. McKenney committed Dec 11, 2011
1 parent 20339ac commit 7181335
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 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: 2c01531f08f8ba663a20d8472a3032f6df133b6e
refs/heads/master: 34240697d619c439c55f21989680024dcb604aab
10 changes: 7 additions & 3 deletions trunk/kernel/rcutree.c
Original file line number Diff line number Diff line change
Expand Up @@ -556,12 +556,16 @@ void rcu_nmi_exit(void)
* rcu_is_cpu_idle - see if RCU thinks that the current CPU is idle
*
* If the current CPU is in its idle loop and is neither in an interrupt
* or NMI handler, return true. The caller must have at least disabled
* preemption.
* or NMI handler, return true.
*/
int rcu_is_cpu_idle(void)
{
return (atomic_read(&__get_cpu_var(rcu_dynticks).dynticks) & 0x1) == 0;
int ret;

preempt_disable();
ret = (atomic_read(&__get_cpu_var(rcu_dynticks).dynticks) & 0x1) == 0;
preempt_enable();
return ret;
}

#endif /* #ifdef CONFIG_PROVE_RCU */
Expand Down

0 comments on commit 7181335

Please sign in to comment.