summaryrefslogtreecommitdiffstats
path: root/include/linux/srcu.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/srcu.h')
-rw-r--r--include/linux/srcu.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/linux/srcu.h b/include/linux/srcu.h
index d3d5fa5..a478c8e 100644
--- a/include/linux/srcu.h
+++ b/include/linux/srcu.h
@@ -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 */
OpenPOWER on IntegriCloud