Lines Matching refs:mutex
26 Mutexes are represented by 'struct mutex', defined in include/linux/mutex.h
27 and implemented in kernel/locking/mutex.c. These locks use an atomic variable
37 When acquiring a mutex, there are three possible paths that can be
49 soon. The mutex spinners are queued up using MCS lock so that only
50 one spinner can compete for the mutex.
61 waiting to spin on mutex owner, only to go directly to slowpath upon
78 The mutex subsystem checks and enforces the following rules:
80 - Only one task can hold the mutex at a time.
81 - Only the owner can unlock the mutex.
84 - A mutex must only be initialized via the API (see below).
85 - A task may not exit with a mutex held.
92 In addition, the mutex debugging code also implements a number of other
107 Statically define the mutex::
111 Dynamically initialize the mutex::
113 mutex_init(mutex);
115 Acquire the mutex, uninterruptible::
117 void mutex_lock(struct mutex *lock);
118 void mutex_lock_nested(struct mutex *lock, unsigned int subclass);
119 int mutex_trylock(struct mutex *lock);
121 Acquire the mutex, interruptible::
123 int mutex_lock_interruptible_nested(struct mutex *lock,
125 int mutex_lock_interruptible(struct mutex *lock);
127 Acquire the mutex, interruptible, if dec to 0::
129 int atomic_dec_and_mutex_lock(atomic_t *cnt, struct mutex *lock);
131 Unlock the mutex::
133 void mutex_unlock(struct mutex *lock);
135 Test if the mutex is taken::
137 int mutex_is_locked(struct mutex *lock);
142 Unlike its original design and purpose, 'struct mutex' is among the largest