First page Back Continue Last page Overview Graphics
The main locking primitive since Linux 2.6.16.
Better than counting semaphores when binary ones are enough.
The process requesting the lock blocks when the lock is already held. Mutexes can therefore only be used in contexts where sleeping is allowed.
Initializing a mutex statically:
Or initializing a mutex dynamically:
void mutex_init(struct mutex *lock);