Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 302756
b: refs/heads/master
c: cef5012
h: refs/heads/master
v: v3
  • Loading branch information
Paul E. McKenney authored and Paul E. McKenney committed Apr 30, 2012
1 parent 5af5fb6 commit 190aaed
Show file tree
Hide file tree
Showing 4 changed files with 199 additions and 99 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: fae4b54f28f034d228fa3bfc98858c698b64e89c
refs/heads/master: cef50120b61c2af4ce34bc165e19cad66296f93d
10 changes: 8 additions & 2 deletions trunk/include/linux/srcu.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,19 @@
#include <linux/rcupdate.h>

struct srcu_struct_array {
int c[2];
unsigned long c[2];
};

/* Bit definitions for field ->c above and ->snap below. */
#define SRCU_USAGE_BITS 2
#define SRCU_REF_MASK (ULONG_MAX >> SRCU_USAGE_BITS)
#define SRCU_USAGE_COUNT (SRCU_REF_MASK + 1)

struct srcu_struct {
int completed;
unsigned completed;
struct srcu_struct_array __percpu *per_cpu_ref;
struct mutex mutex;
unsigned long snap[NR_CPUS];
#ifdef CONFIG_DEBUG_LOCK_ALLOC
struct lockdep_map dep_map;
#endif /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */
Expand Down
2 changes: 1 addition & 1 deletion trunk/kernel/rcutorture.c
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ static int srcu_torture_stats(char *page)
cnt += sprintf(&page[cnt], "%s%s per-CPU(idx=%d):",
torture_type, TORTURE_FLAG, idx);
for_each_possible_cpu(cpu) {
cnt += sprintf(&page[cnt], " %d(%d,%d)", cpu,
cnt += sprintf(&page[cnt], " %d(%lu,%lu)", cpu,
per_cpu_ptr(srcu_ctl.per_cpu_ref, cpu)->c[!idx],
per_cpu_ptr(srcu_ctl.per_cpu_ref, cpu)->c[idx]);
}
Expand Down
Loading

0 comments on commit 190aaed

Please sign in to comment.