+
+#define LCK_RW_ATTR_DEBUG 0x1
+#define LCK_RW_ATTR_DEBUGb 0
+#define LCK_RW_ATTR_STAT 0x2
+#define LCK_RW_ATTR_STATb 1
+#define LCK_RW_ATTR_READ_PRI 0x3
+#define LCK_RW_ATTR_READ_PRIb 2
+#define LCK_RW_ATTR_DIS_THREAD 0x40000000
+#define LCK_RW_ATTR_DIS_THREADb 30
+#define LCK_RW_ATTR_DIS_MYLOCK 0x10000000
+#define LCK_RW_ATTR_DIS_MYLOCKb 28
+
+#define LCK_RW_TAG_DESTROYED 0x00002007 /* lock marked as Destroyed */
+
+#define RW_LOCK_READER_EVENT(x) ((event_t) (((unsigned char*) (x)) + (offsetof(lck_rw_t, lck_rw_tag))))
+#define RW_LOCK_WRITER_EVENT(x) ((event_t) (((unsigned char*) (x)) + (offsetof(lck_rw_t, lck_rw_pad8))))
+#define READ_EVENT_TO_RWLOCK(x) ((lck_rw_t *)(((unsigned char*)(x) - (offsetof(lck_rw_t, lck_rw_tag)))))
+#define WRITE_EVENT_TO_RWLOCK(x) ((lck_rw_t *)(((unsigned char*)(x) - (offsetof(lck_rw_t, lck_rw_pad8)))))
+
+#if LOCK_PRIVATE
+
+#define disable_preemption_for_thread(t) disable_preemption_internal()
+#define preemption_disabled_for_thread(t) (get_preemption_level() > 0)
+
+#define LCK_MTX_THREAD_TO_STATE(t) ((uintptr_t)t)
+#define PLATFORM_LCK_ILOCK 0
+
+#define LOCK_SNOOP_SPINS 1000
+#define LOCK_PRETEST 1
+
+/* hw_lock_lock static panic deadline, in timebase units. hw_lock_to() uses
+ * LockTimeoutTSC computed at startup
+ */
+#define LOCK_PANIC_TIMEOUT 0xf000000 /* 251e6 TSC ticks */
+
+#endif // LOCK_PRIVATE