Skip to main content.

5.7.4.2. Mutexes

API: Kernel Mutexes

initalize:

DEFINE_MUTEX(name);

at runtime:

mutex_init(struct mutex *lock);

locking:

void mutex_lock(struct mutex *lock);
int mutex_lock_interruptible(struct mutex *lock);
int mutex_trylock(struct mutex *lock);

unlocking:

void mutex_unlock(struct mutex *lock);

testing state:

int mutex_is_locked(struct mutex *lock);
5.7.4.1. Atomic operations 1. Denx Training Topics 5.7.4.3. Spinlocks
Prev Home Next