Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 23035
b: refs/heads/master
c: 9331b31
h: refs/heads/master
i:
  23033: 25f6e14
  23031: 6605702
v: v3
  • Loading branch information
Ingo Molnar authored and Linus Torvalds committed Mar 23, 2006
1 parent b4f10af commit ecbef91
Show file tree
Hide file tree
Showing 2 changed files with 6 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: 3d3f26a7baaa921a0e790b4c72d20f0de91a5d65
refs/heads/master: 9331b3157c835353dd28efcd80d23563ad226aee
10 changes: 5 additions & 5 deletions trunk/kernel/rcupdate.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
#include <linux/notifier.h>
#include <linux/rcupdate.h>
#include <linux/cpu.h>
#include <linux/mutex.h>

/* Definition for rcupdate control block. */
struct rcu_ctrlblk rcu_ctrlblk = {
Expand Down Expand Up @@ -75,7 +76,7 @@ static int rsinterval = 1000;
#endif

static atomic_t rcu_barrier_cpu_count;
static struct semaphore rcu_barrier_sema;
static DEFINE_MUTEX(rcu_barrier_mutex);
static struct completion rcu_barrier_completion;

#ifdef CONFIG_SMP
Expand Down Expand Up @@ -207,13 +208,13 @@ static void rcu_barrier_func(void *notused)
void rcu_barrier(void)
{
BUG_ON(in_interrupt());
/* Take cpucontrol semaphore to protect against CPU hotplug */
down(&rcu_barrier_sema);
/* Take cpucontrol mutex to protect against CPU hotplug */
mutex_lock(&rcu_barrier_mutex);
init_completion(&rcu_barrier_completion);
atomic_set(&rcu_barrier_cpu_count, 0);
on_each_cpu(rcu_barrier_func, NULL, 0, 1);
wait_for_completion(&rcu_barrier_completion);
up(&rcu_barrier_sema);
mutex_unlock(&rcu_barrier_mutex);
}
EXPORT_SYMBOL_GPL(rcu_barrier);

Expand Down Expand Up @@ -549,7 +550,6 @@ static struct notifier_block __devinitdata rcu_nb = {
*/
void __init rcu_init(void)
{
sema_init(&rcu_barrier_sema, 1);
rcu_cpu_notify(&rcu_nb, CPU_UP_PREPARE,
(void *)(long)smp_processor_id());
/* Register notifier for non-boot CPUs */
Expand Down

0 comments on commit ecbef91

Please sign in to comment.