summaryrefslogtreecommitdiff
path: root/tools/include/linux/spinlock.h
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2017-02-17 15:04:56 +1100
committerStephen Rothwell <sfr@canb.auug.org.au>2017-02-17 15:04:56 +1100
commit200445685b48a1f4eb8e4abb4ae46f22236b1197 (patch)
treedf539695199b303a7a0cd975c951bcb3987b59f8 /tools/include/linux/spinlock.h
parent347739198a12693d0b7880fcd1a009a75f62b945 (diff)
parent768dd325a38200abb3725bbd490773ce65954752 (diff)
Merge remote-tracking branch 'idr/idr-4.11'
Diffstat (limited to 'tools/include/linux/spinlock.h')
-rw-r--r--tools/include/linux/spinlock.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/include/linux/spinlock.h b/tools/include/linux/spinlock.h
new file mode 100644
index 000000000000..58397dcb19d6
--- /dev/null
+++ b/tools/include/linux/spinlock.h
@@ -0,0 +1,5 @@
+#define spinlock_t pthread_mutex_t
+#define DEFINE_SPINLOCK(x) pthread_mutex_t x = PTHREAD_MUTEX_INITIALIZER;
+
+#define spin_lock_irqsave(x, f) (void)f, pthread_mutex_lock(x)
+#define spin_unlock_irqrestore(x, f) (void)f, pthread_mutex_unlock(x)