Thread (137 messages) 137 messages, 6 authors, 2021-05-31

Re: [PATCH 26/94] Maple Tree: Add new data structure

From: Peter Zijlstra <peterz@infradead.org>
Date: 2021-05-14 10:41:29
Also in: lkml

On Wed, Apr 28, 2021 at 03:36:02PM +0000, Liam Howlett wrote:
+/* Flags:
+ * MAPLE_ALLOC_RANGE	Use allocation ranges (tracks gaps) in this tree
+ * MAPLE_USE_RCU	Operate in read/copy/update mode for multi-readers.
+ * MAPLE_HEIGHT_OFFSET	The position of the tree height in the flags
+ * MAPLE_HEIGHT_MASK	The mask for the maple tree height value.
+ */
Regular comment style would be:

/*
 * Flags:
 ...
 */
+#define MAPLE_ALLOC_RANGE	1	// Bit 0
+#define MAPLE_USE_RCU		2	// Bit 1
+#define	MAPLE_HEIGHT_OFFSET	2	// Bit 2
+#define	MAPLE_HEIGHT_MASK	60	// Bits 2-5
Can we pretty please keep masks in hex, like:

#define MAPLE_HEIGHT_MASK	0x3c

Because then it's instantly obvious is it bits 2-5.

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help