diff options
author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2010-11-08 15:02:09 -0500 |
---|---|---|
committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2010-11-11 17:57:42 -0500 |
commit | 34310fd7dbc3ad98d8e7cafa4f872ba71ca00860 (patch) | |
tree | 31ddcaa124430c37ccb5e2f4cb0a69c37ad885ba /include/litmus/litmus.h | |
parent | c6182ba4a548baf0d1238d0df54e7d38ed299c3e (diff) |
Split out TRACE() from litmus.h and cleanup some includes
The TRACE() functionality doesn't need all of litmus.h. Currently,
it's impossible to use TRACE() in sched.h due to a circular
dependency. This patch moves TRACE() and friends to
litmus/sched_debug.h, which can be included in sched.h.
While at it, also fix some minor include ugliness that was revealed by
this change.
Diffstat (limited to 'include/litmus/litmus.h')
-rw-r--r-- | include/litmus/litmus.h | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/include/litmus/litmus.h b/include/litmus/litmus.h index 5d20276e44f4..30f41869b455 100644 --- a/include/litmus/litmus.h +++ b/include/litmus/litmus.h | |||
@@ -6,38 +6,12 @@ | |||
6 | #ifndef _LINUX_LITMUS_H_ | 6 | #ifndef _LINUX_LITMUS_H_ |
7 | #define _LINUX_LITMUS_H_ | 7 | #define _LINUX_LITMUS_H_ |
8 | 8 | ||
9 | #include <linux/jiffies.h> | 9 | #include <litmus/debug_trace.h> |
10 | #include <litmus/sched_trace.h> | ||
11 | 10 | ||
12 | #ifdef CONFIG_RELEASE_MASTER | 11 | #ifdef CONFIG_RELEASE_MASTER |
13 | extern atomic_t release_master_cpu; | 12 | extern atomic_t release_master_cpu; |
14 | #endif | 13 | #endif |
15 | 14 | ||
16 | extern atomic_t __log_seq_no; | ||
17 | |||
18 | #define TRACE(fmt, args...) \ | ||
19 | sched_trace_log_message("%d P%d: " fmt, atomic_add_return(1, &__log_seq_no), \ | ||
20 | raw_smp_processor_id(), ## args) | ||
21 | |||
22 | #define TRACE_TASK(t, fmt, args...) \ | ||
23 | TRACE("(%s/%d) " fmt, (t)->comm, (t)->pid, ##args) | ||
24 | |||
25 | #define TRACE_CUR(fmt, args...) \ | ||
26 | TRACE_TASK(current, fmt, ## args) | ||
27 | |||
28 | #define TRACE_BUG_ON(cond) \ | ||
29 | do { if (cond) TRACE("BUG_ON(%s) at %s:%d " \ | ||
30 | "called from %p current=%s/%d state=%d " \ | ||
31 | "flags=%x partition=%d cpu=%d rtflags=%d"\ | ||
32 | " job=%u timeslice=%u\n", \ | ||
33 | #cond, __FILE__, __LINE__, __builtin_return_address(0), current->comm, \ | ||
34 | current->pid, current->state, current->flags, \ | ||
35 | get_partition(current), smp_processor_id(), get_rt_flags(current), \ | ||
36 | current->rt_param.job_params.job_no, \ | ||
37 | current->rt.time_slice\ | ||
38 | ); } while(0); | ||
39 | |||
40 | |||
41 | /* in_list - is a given list_head queued on some list? | 15 | /* in_list - is a given list_head queued on some list? |
42 | */ | 16 | */ |
43 | static inline int in_list(struct list_head* list) | 17 | static inline int in_list(struct list_head* list) |