/*
- * Copyright (c) 2003-2007 Apple Inc. All rights reserved.
+ * Copyright (c) 2003-2012 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
#include <kern/queue.h>
extern void lck_mod_init(
- void) __attribute__((section("__TEXT, initcode")));
+ void);
typedef unsigned int lck_type_t;
extern void lck_mtx_lock(
lck_mtx_t *lck);
-#if defined(__i386__)
-extern void lck_mtx_unlock(lck_mtx_t *lck) __DARWIN10_ALIAS(lck_mtx_unlock);
-#else
extern void lck_mtx_unlock(
lck_mtx_t *lck);
-#endif /* __i386__ */
extern void lck_mtx_destroy(
lck_mtx_t *lck,
extern boolean_t lck_mtx_try_lock_spin(
lck_mtx_t *lck);
+extern boolean_t lck_mtx_try_lock_spin_always(
+ lck_mtx_t *lck);
+
extern void lck_mtx_lock_spin_always(
lck_mtx_t *lck);
#else
#define lck_mtx_try_lock_spin(l) lck_mtx_try_lock(l)
#define lck_mtx_lock_spin(l) lck_mtx_lock(l)
+#define lck_mtx_try_lock_spin_always(l) lck_spin_try_lock(l)
#define lck_mtx_lock_spin_always(l) lck_spin_lock(l)
#define lck_mtx_unlock_always(l) lck_spin_unlock(l)
#define lck_mtx_convert_spin(l) do {} while (0)
#ifdef XNU_KERNEL_PRIVATE
#define LCK_RW_ASSERT_SHARED 0x01
#define LCK_RW_ASSERT_EXCLUSIVE 0x02
-#define LCK_RW_ASSERT_HELD (LCK_RW_ASSERT_SHARED | LCK_RW_ASSERT_EXCLUSIVE)
+#define LCK_RW_ASSERT_HELD 0x03
+#define LCK_RW_ASSERT_NOTHELD 0x04
#endif
__BEGIN_DECLS
extern void lck_rw_assert(
lck_rw_t *lck,
unsigned int type);
+
+extern void lck_rw_clear_promotion(
+ thread_t thread);
#endif
#ifdef KERNEL_PRIVATE