DENX . Training2 . LddMutex

5.7.4.2. Mutexes

API: Kernel Mutexes

initalize:

#include <linux/mutex.h>

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);

----- Revision r1.4 - 30 Jul 2008 - 12:42 - MarkusKlotzbuecher
Copyright © 2002-2019 by DENX Software Engineering