Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 126791
b: refs/heads/master
c: ea7d3fe
h: refs/heads/master
i:
  126789: fa98715
  126787: 5c92f8d
  126783: 82ce80a
v: v3
  • Loading branch information
Paul E. McKenney authored and Ingo Molnar committed Jan 5, 2009
1 parent 37dba46 commit f1d2d09
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 16 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: 90a4d2c0106bb690f0b6af3d506febc35c658aa7
refs/heads/master: ea7d3fef4222cd98556a0b386598268d4dbf6670
12 changes: 0 additions & 12 deletions trunk/include/linux/rcupdate.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,18 +204,6 @@ struct rcu_synchronize {

extern void wakeme_after_rcu(struct rcu_head *head);

#define synchronize_rcu_xxx(name, func) \
void name(void) \
{ \
struct rcu_synchronize rcu; \
\
init_completion(&rcu.completion); \
/* Will wake me after RCU finished. */ \
func(&rcu.head, wakeme_after_rcu); \
/* Wait for it. */ \
wait_for_completion(&rcu.completion); \
}

/**
* synchronize_sched - block until all CPUs have exited any non-preemptive
* kernel code sequences.
Expand Down
11 changes: 9 additions & 2 deletions trunk/kernel/rcupdate.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,15 @@ void wakeme_after_rcu(struct rcu_head *head)
* sections are delimited by rcu_read_lock() and rcu_read_unlock(),
* and may be nested.
*/
void synchronize_rcu(void); /* Makes kernel-doc tools happy */
synchronize_rcu_xxx(synchronize_rcu, call_rcu)
void synchronize_rcu(void)
{
struct rcu_synchronize rcu;
init_completion(&rcu.completion);
/* Will wake me after RCU finished. */
call_rcu(&rcu.head, wakeme_after_rcu);
/* Wait for it. */
wait_for_completion(&rcu.completion);
}
EXPORT_SYMBOL_GPL(synchronize_rcu);

static void rcu_barrier_callback(struct rcu_head *notused)
Expand Down
11 changes: 10 additions & 1 deletion trunk/kernel/rcupreempt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1177,7 +1177,16 @@ EXPORT_SYMBOL_GPL(call_rcu_sched);
* in -rt this does -not- necessarily result in all currently executing
* interrupt -handlers- having completed.
*/
synchronize_rcu_xxx(__synchronize_sched, call_rcu_sched)
void __synchronize_sched(void)
{
struct rcu_synchronize rcu;

init_completion(&rcu.completion);
/* Will wake me after RCU finished. */
call_rcu_sched(&rcu.head, wakeme_after_rcu);
/* Wait for it. */
wait_for_completion(&rcu.completion);
}
EXPORT_SYMBOL_GPL(__synchronize_sched);

/*
Expand Down

0 comments on commit f1d2d09

Please sign in to comment.