#include <kern/lock_attr.h>
kern/lock_attr.h
typedeflck_attr_t
typedef struct __lck_attr__ lck_attr_t
macroLCK_ATTR_NULL
#define LCK_ATTR_NULL ((lck_attr_t *)NULL)
functionlck_attr_alloc_init
extern lck_attr_t *lck_attr_alloc_init(void)
▾
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu osfmk/kern/lock_group.c
Allocates a lock attribute structure and initializes it to the default attribute values. The result is freed with lck_attr_free. Default attributes include LCK_ATTR_DEBUG when the lock debugging boot-args are set.
functionlck_attr_setdefault
extern void lck_attr_setdefault(lck_attr_t *attr)
▾
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu osfmk/kern/lock_group.c
Resets the lock attribute structure to the system default attribute values.
functionlck_attr_setdebug
extern void lck_attr_setdebug(lck_attr_t *attr)
▾
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu osfmk/kern/lock_group.c
Sets the LCK_ATTR_DEBUG flag in the lock attribute structure, so locks initialized with it have debugging (profiling) enabled.
functionlck_attr_cleardebug
extern void lck_attr_cleardebug(lck_attr_t *attr)
▾
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu osfmk/kern/lock_group.c
Clears the LCK_ATTR_DEBUG flag in the lock attribute structure.
functionlck_attr_free
extern void lck_attr_free(lck_attr_t *attr)
▾
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu osfmk/kern/lock_group.c
Frees a lock attribute structure previously allocated with lck_attr_alloc_init.