aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern Brandenburg <bbb@mpi-sws.org>2017-06-09 07:34:34 -0400
committerBjoern Brandenburg <bbb@mpi-sws.org>2017-06-09 07:34:34 -0400
commitfe94fb01f41e402746d30a23f7a777c7e6785b07 (patch)
treea772009136637f0c65bdc23de2a19276d68e9528
parentd7f7021d1ad6c0bf8b2434a021ab69a42e4ce77e (diff)
litmus/preempt.h: do not pollute namespace with TRACE()
This file is indirectly included in a _a lot_ of Linux. A generic name like TRACE causes a symbol clashes in drivers, SquashFS, etc. To avoid this, use only the LITMUS-prefixed version in preempt.h.
-rw-r--r--include/litmus/preempt.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/litmus/preempt.h b/include/litmus/preempt.h
index 8f8bb635cb21..ffb602772896 100644
--- a/include/litmus/preempt.h
+++ b/include/litmus/preempt.h
@@ -6,8 +6,6 @@
6#include <linux/percpu.h> 6#include <linux/percpu.h>
7#include <asm/atomic.h> 7#include <asm/atomic.h>
8 8
9#include <litmus/debug_trace.h>
10
11DECLARE_PER_CPU(bool, litmus_preemption_in_progress); 9DECLARE_PER_CPU(bool, litmus_preemption_in_progress);
12 10
13/* is_current_running() is legacy macro (and a hack) that is used to make 11/* is_current_running() is legacy macro (and a hack) that is used to make
@@ -37,8 +35,13 @@ DECLARE_PER_CPU(bool, litmus_preemption_in_progress);
37DECLARE_PER_CPU_SHARED_ALIGNED(atomic_t, resched_state); 35DECLARE_PER_CPU_SHARED_ALIGNED(atomic_t, resched_state);
38 36
39#ifdef CONFIG_PREEMPT_STATE_TRACE 37#ifdef CONFIG_PREEMPT_STATE_TRACE
38/* this file is included widely --- be careful not to pollute the namespace
39 * with the TRACE() symbol */
40#define LITMUS_DEBUG_TRACE_DONT_POLLUTE_NAMESPACE
41#include <litmus/debug_trace.h>
42#undef LITMUS_DEBUG_TRACE_DONT_POLLUTE_NAMESPACE
40const char* sched_state_name(int s); 43const char* sched_state_name(int s);
41#define TRACE_STATE(fmt, args...) TRACE("SCHED_STATE " fmt, args) 44#define TRACE_STATE(fmt, args...) LITMUS_TRACE("SCHED_STATE " fmt, args)
42#else 45#else
43#define TRACE_STATE(fmt, args...) /* ignore */ 46#define TRACE_STATE(fmt, args...) /* ignore */
44#endif 47#endif