Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 26701
b: refs/heads/master
c: 986733e
h: refs/heads/master
i:
  26699: 1296c40
v: v3
  • Loading branch information
Heiko Carstens authored and Linus Torvalds committed May 15, 2006
1 parent 62f0b19 commit a506567
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3b7c8108273bed41a2fc04533cc9f2026ff38c8e
refs/heads/master: 986733e01d258c26107f1da9d8d47c718349ad2f
1 change: 1 addition & 0 deletions trunk/include/linux/rcupdate.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ static inline void rcu_bh_qsctr_inc(int cpu)
}

extern int rcu_pending(int cpu);
extern int rcu_needs_cpu(int cpu);

/**
* rcu_read_lock - mark the beginning of an RCU read-side critical section.
Expand Down
19 changes: 19 additions & 0 deletions trunk/kernel/rcupdate.c
Original file line number Diff line number Diff line change
Expand Up @@ -479,12 +479,31 @@ static int __rcu_pending(struct rcu_ctrlblk *rcp, struct rcu_data *rdp)
return 0;
}

/*
* Check to see if there is any immediate RCU-related work to be done
* by the current CPU, returning 1 if so. This function is part of the
* RCU implementation; it is -not- an exported member of the RCU API.
*/
int rcu_pending(int cpu)
{
return __rcu_pending(&rcu_ctrlblk, &per_cpu(rcu_data, cpu)) ||
__rcu_pending(&rcu_bh_ctrlblk, &per_cpu(rcu_bh_data, cpu));
}

/*
* Check to see if any future RCU-related work will need to be done
* by the current CPU, even if none need be done immediately, returning
* 1 if so. This function is part of the RCU implementation; it is -not-
* an exported member of the RCU API.
*/
int rcu_needs_cpu(int cpu)
{
struct rcu_data *rdp = &per_cpu(rcu_data, cpu);
struct rcu_data *rdp_bh = &per_cpu(rcu_bh_data, cpu);

return (!!rdp->curlist || !!rdp_bh->curlist || rcu_pending(cpu));
}

void rcu_check_callbacks(int cpu, int user)
{
if (user ||
Expand Down

0 comments on commit a506567

Please sign in to comment.