+#ifdef CONFIG_LOCKDEP_CROSSRELEASE
+
+#define idx(t) ((t)->xhlock_idx)
+#define idx_prev(i) ((i) ? (i) - 1 : MAX_XHLOCKS_NR - 1)
+#define idx_next(i) (((i) + 1) % MAX_XHLOCKS_NR)
Note that:
#define idx_prev(i) (((i) - 1) % MAX_XHLOCKS_NR)
#define idx_next(i) (((i) + 1) % MAX_XHLOCKS_NR)
is more symmetric and easier to understand.
+
+/* For easy access to xhlock */
+#define xhlock(t, i) ((t)->xhlocks + (i))
+#define xhlock_prev(t, l) xhlock(t, idx_prev((l) - (t)->xhlocks))
+#define xhlock_curr(t) xhlock(t, idx(t))
So these result in an xhlock pointer
+#define xhlock_incr(t) ({idx(t) = idx_next(idx(t));})
This does not; which is confusing seeing how they share the same
namespace; also incr is weird.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>