Lines Matching refs:mutex
23 * - only one task can hold the mutex at a time
24 * - only the owner can unlock the mutex
27 * - a mutex object must be initialized via the API
28 * - a mutex object must not be initialized via memset or copying
29 * - task may not exit with mutex held
35 * enabled. Furthermore, besides enforcing the above rules, the mutex
47 struct mutex {
63 * This is the control structure for tasks blocked on mutex,
70 struct mutex *lock;
76 # include <linux/mutex-debug.h>
79 # define mutex_init(mutex) \
83 __mutex_init((mutex), #mutex, &__key); \
85 # define mutex_destroy(mutex) do { } while (0)
103 struct mutex mutexname = __MUTEX_INITIALIZER(mutexname)
105 extern void __mutex_init(struct mutex *lock, const char *name,
109 * mutex_is_locked - is the mutex locked
110 * @lock: the mutex to be queried
112 * Returns 1 if the mutex is locked, 0 if unlocked.
114 static inline int fastcall mutex_is_locked(struct mutex *lock)
120 * See kernel/mutex.c for detailed documentation of these APIs.
121 * Also see Documentation/mutex-design.txt.
123 extern void fastcall mutex_lock(struct mutex *lock);
124 extern int fastcall mutex_lock_interruptible(struct mutex *lock);
127 extern void mutex_lock_nested(struct mutex *lock, unsigned int subclass);
136 extern int fastcall mutex_trylock(struct mutex *lock);
137 extern void fastcall mutex_unlock(struct mutex *lock);