Keyronex Keyronex manual pages

KMUTEX(9) Kernel Developer's Manual KMUTEX(9)

kmutex, ke_mutex_init, ke_mutex_release, ke_mutex_assert_helddispatcher mutex object

#include <kdk/kern.h>

void
ke_mutex_init(kevent_t *mutex);

void
ke_mutex_release(kmutex_t *mutex);

void
ke_mutex_assert_held(kmutex_t *mutex);

The dispatcher mutex object is a dispatcher object that can be waited on by ke_wait(9), defined by the kmutex_t type.

The mutex object is in one of two states: held or not held. While a mutex object is held, it cannot be acquired by another thread; the thread that holds the mutex must release it first, and until then, waiters will be put to sleep.

The () function initialises a mutex object, setting its state to not held.

The () function releases a mutex object, setting its state to not held. It is an error to release a mutex that is not held.

The () macro asserts that the mutex is held by the current thread.

All these functions may be called from any context at or below kIPLDPC.

These functions are implemented in kernel/kern/mutex.c.

The interface is declared in kernel/include/kdk/kern.h.

ke_wait(9),

These interfaces have always been in Keyronex.

October 6, 2024 Debian