Revert "Roll NDK to r11c and extract it into its own repository."
[android_tools.git] / ndk / platforms / android-16 / arch-arm / usr / include / linux / mutex.h
blob4b33a8ad544e923d7e2ef7767f4ad3433d920825
1 /****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 ****************************************************************************
11 ****************************************************************************/
12 #ifndef __LINUX_MUTEX_H
13 #define __LINUX_MUTEX_H
15 #include <linux/list.h>
16 #include <linux/spinlock_types.h>
17 #include <linux/linkage.h>
18 #include <linux/lockdep.h>
20 #include <asm/atomic.h>
22 struct mutex {
24 atomic_t count;
25 spinlock_t wait_lock;
26 struct list_head wait_list;
29 struct mutex_waiter {
30 struct list_head list;
31 struct task_struct *task;
34 #define __DEBUG_MUTEX_INITIALIZER(lockname)
35 #define mutex_init(mutex) do { static struct lock_class_key __key; __mutex_init((mutex), #mutex, &__key); } while (0)
36 #define mutex_destroy(mutex) do { } while (0)
38 #define __DEP_MAP_MUTEX_INITIALIZER(lockname)
40 #define __MUTEX_INITIALIZER(lockname) { .count = ATOMIC_INIT(1) , .wait_lock = SPIN_LOCK_UNLOCKED , .wait_list = LIST_HEAD_INIT(lockname.wait_list) __DEBUG_MUTEX_INITIALIZER(lockname) __DEP_MAP_MUTEX_INITIALIZER(lockname) }
42 #define DEFINE_MUTEX(mutexname) struct mutex mutexname = __MUTEX_INITIALIZER(mutexname)
44 #define mutex_lock_nested(lock, subclass) mutex_lock(lock)
46 #endif