hc
2024-01-05 071106ecf68c401173c58808b1cf5f68cc50d390
kernel/tools/include/linux/spinlock.h
....@@ -8,8 +8,14 @@
88 #define spinlock_t pthread_mutex_t
99 #define DEFINE_SPINLOCK(x) pthread_mutex_t x = PTHREAD_MUTEX_INITIALIZER
1010 #define __SPIN_LOCK_UNLOCKED(x) (pthread_mutex_t)PTHREAD_MUTEX_INITIALIZER
11
-#define spin_lock_init(x) pthread_mutex_init(x, NULL)
11
+#define spin_lock_init(x) pthread_mutex_init(x, NULL)
1212
13
+#define spin_lock(x) pthread_mutex_lock(x)
14
+#define spin_unlock(x) pthread_mutex_unlock(x)
15
+#define spin_lock_bh(x) pthread_mutex_lock(x)
16
+#define spin_unlock_bh(x) pthread_mutex_unlock(x)
17
+#define spin_lock_irq(x) pthread_mutex_lock(x)
18
+#define spin_unlock_irq(x) pthread_mutex_unlock(x)
1319 #define spin_lock_irqsave(x, f) (void)f, pthread_mutex_lock(x)
1420 #define spin_unlock_irqrestore(x, f) (void)f, pthread_mutex_unlock(x)
1521
....@@ -31,4 +37,6 @@
3137 return true;
3238 }
3339
40
+#include <linux/lockdep.h>
41
+
3442 #endif