+#define LCK_RW_SHARED_SHIFT 0
+#define LCK_RW_INTERLOCK_BIT 16
+#define LCK_RW_PRIV_EXCL_BIT 24
+#define LCK_RW_WANT_UPGRADE_BIT 25
+#define LCK_RW_WANT_EXCL_BIT 26
+#define LCK_RW_R_WAITING_BIT 27
+#define LCK_RW_W_WAITING_BIT 28
+#define LCK_RW_CAN_SLEEP_BIT 29
+
+#define LCK_RW_INTERLOCK (1 << LCK_RW_INTERLOCK_BIT)
+#define LCK_RW_WANT_UPGRADE (1 << LCK_RW_WANT_UPGRADE_BIT)
+#define LCK_RW_WANT_EXCL (1 << LCK_RW_WANT_EXCL_BIT)
+#define LCK_RW_R_WAITING (1 << LCK_RW_R_WAITING_BIT)
+#define LCK_RW_W_WAITING (1 << LCK_RW_W_WAITING_BIT)
+#define LCK_RW_PRIV_EXCL (1 << LCK_RW_PRIV_EXCL_BIT)
+#define LCK_RW_TAG_VALID (1 << LCK_RW_TAG_VALID_BIT)
+#define LCK_RW_SHARED_MASK (0xffff << LCK_RW_SHARED_SHIFT)
+#define LCK_RW_SHARED_READER (1 << LCK_RW_SHARED_SHIFT)
+
+#define LCK_RW_WANT_WRITE LCK_RW_WANT_EXCL
+
+