summaryrefslogtreecommitdiff
path: root/tools/include/linux/spinlock.h
diff options
context:
space:
mode:
authorMatthew Wilcox <willy@infradead.org>2017-11-10 17:34:31 +0300
committerMatthew Wilcox <willy@infradead.org>2018-10-21 17:45:57 +0300
commit9b89a0355144685a787b0dc5bcf7bdd6f2d02968 (patch)
tree5e9d4f434e638313df1f9d96c145097b9897d122 /tools/include/linux/spinlock.h
parentad3d6c7263e368abdc151e1cc13dc78aa39cc7a7 (diff)
downloadlinux-9b89a0355144685a787b0dc5bcf7bdd6f2d02968.tar.xz
xarray: Add XArray marks
XArray marks are like the radix tree tags, only slightly more strongly typed. They are renamed in order to distinguish them from tagged pointers. This commit adds the basic get/set/clear operations. Signed-off-by: Matthew Wilcox <willy@infradead.org>
Diffstat (limited to 'tools/include/linux/spinlock.h')
-rw-r--r--tools/include/linux/spinlock.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/include/linux/spinlock.h b/tools/include/linux/spinlock.h
index 1738c0391da4..622266b197d0 100644
--- a/tools/include/linux/spinlock.h
+++ b/tools/include/linux/spinlock.h
@@ -8,8 +8,14 @@
#define spinlock_t pthread_mutex_t
#define DEFINE_SPINLOCK(x) pthread_mutex_t x = PTHREAD_MUTEX_INITIALIZER
#define __SPIN_LOCK_UNLOCKED(x) (pthread_mutex_t)PTHREAD_MUTEX_INITIALIZER
-#define spin_lock_init(x) pthread_mutex_init(x, NULL)
-
+#define spin_lock_init(x) pthread_mutex_init(x, NULL)
+
+#define spin_lock(x) pthread_mutex_lock(x)
+#define spin_unlock(x) pthread_mutex_unlock(x)
+#define spin_lock_bh(x) pthread_mutex_lock(x)
+#define spin_unlock_bh(x) pthread_mutex_unlock(x)
+#define spin_lock_irq(x) pthread_mutex_lock(x)
+#define spin_unlock_irq(x) pthread_mutex_unlock(x)
#define spin_lock_irqsave(x, f) (void)f, pthread_mutex_lock(x)
#define spin_unlock_irqrestore(x, f) (void)f, pthread_mutex_unlock(x)