[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1229022348-32311-1-git-send-email-tim@klingt.org>
Date: Thu, 11 Dec 2008 20:05:48 +0100
From: Tim Blechmann <tim@...ngt.org>
To: rostedt@...dmis.org
Cc: linux-kernel@...r.kernel.org, linux-rt-users@...r.kernel.org,
mingo@...e.hu, tglx@...utronix.de, Tim Blechmann <tim@...ngt.org>
Subject: [PATCH] [RT] preempt_disable_rt for CONFIG_PREEMPT_RT
in some cases, spinlocks are used to avoid preemption. does not work
correctly, when CONFIG_PREEMPT_RT is enabled.
therefore two new macros are introduced:
preempt_disable_rt/preempt_disable_rt behave like their equivalents, if
CONFIG_PREEMPT_RT is enabled, and as noops otherwise.
Signed-off-by: Tim Blechmann <tim@...ngt.org>
---
include/linux/preempt.h | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/include/linux/preempt.h b/include/linux/preempt.h
index 72b1a10..2526170 100644
--- a/include/linux/preempt.h
+++ b/include/linux/preempt.h
@@ -93,6 +93,16 @@ do { \
#endif
+#ifdef CONFIG_PREEMPT_RT
+#define preempt_disable_rt preempt_disable
+#define preempt_enable_rt preempt_enable
+#else
+#define
+#define preempt_disable_rt do { } while (0)
+#define preempt_enable_rt do { } while (0)
+#endif
+
+
#ifdef CONFIG_PREEMPT_NOTIFIERS
struct preempt_notifier;
--
1.5.6.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists