+#ifdef MACH_KERNEL_PRIVATE
+
+typedef uint32_t hw_lock_bit_t;
+
+#if LOCK_STATS
+extern void hw_lock_bit(
+ hw_lock_bit_t *,
+ unsigned int,
+ lck_grp_t*);
+
+extern void hw_lock_bit_nopreempt(
+ hw_lock_bit_t *,
+ unsigned int,
+ lck_grp_t*);
+
+extern unsigned int hw_lock_bit_try(
+ hw_lock_bit_t *,
+ unsigned int,
+ lck_grp_t*);
+
+extern unsigned int hw_lock_bit_to(
+ hw_lock_bit_t *,
+ unsigned int,
+ uint32_t,
+ lck_grp_t*);
+
+#else
+extern void hw_lock_bit(
+ hw_lock_bit_t *,
+ unsigned int);
+#define hw_lock_bit(lck, bit, grp) hw_lock_bit(lck, bit)
+
+extern void hw_lock_bit_nopreempt(
+ hw_lock_bit_t *,
+ unsigned int);
+#define hw_lock_bit_nopreempt(lck, bit, grp) hw_lock_bit_nopreempt(lck, bit)
+
+extern unsigned int hw_lock_bit_try(
+ hw_lock_bit_t *,
+ unsigned int);
+#define hw_lock_bit_try(lck, bit, grp) hw_lock_bit_try(lck, bit)
+
+extern unsigned int hw_lock_bit_to(
+ hw_lock_bit_t *,
+ unsigned int,
+ uint32_t);
+#define hw_lock_bit_to(lck, bit, timeout, grp) hw_lock_bit_to(lck, bit, timeout)
+
+#endif /* LOCK_STATS */
+
+extern void hw_unlock_bit(
+ hw_lock_bit_t *,
+ unsigned int);
+
+extern void hw_unlock_bit_nopreempt(
+ hw_lock_bit_t *,
+ unsigned int);
+
+#define hw_lock_bit_held(l, b) (((*(l))&(1<<b))!=0)
+
+#endif /* MACH_KERNEL_PRIVATE */
+