aboutsummaryrefslogtreecommitdiff
path: root/include/linux/locallock.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/locallock.h')
-rw-r--r--include/linux/locallock.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/locallock.h b/include/linux/locallock.h
index f1804a38dd44..a5eea5df7cc2 100644
--- a/include/linux/locallock.h
+++ b/include/linux/locallock.h
@@ -25,6 +25,9 @@ struct local_irq_lock {
DEFINE_PER_CPU(struct local_irq_lock, lvar) = { \
.lock = __SPIN_LOCK_UNLOCKED((lvar).lock) }
+#define DECLARE_LOCAL_IRQ_LOCK(lvar) \
+ DECLARE_PER_CPU(struct local_irq_lock, lvar)
+
#define local_irq_lock_init(lvar) \
do { \
int __cpu; \
@@ -220,6 +223,7 @@ static inline int __local_unlock_irqrestore(struct local_irq_lock *lv,
#else /* PREEMPT_RT_BASE */
#define DEFINE_LOCAL_IRQ_LOCK(lvar) __typeof__(const int) lvar
+#define DECLARE_LOCAL_IRQ_LOCK(lvar) extern __typeof__(const int) lvar
static inline void local_irq_lock_init(int lvar) { }