diff options
author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2008-05-10 04:41:42 -0400 |
---|---|---|
committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2008-05-10 04:41:42 -0400 |
commit | 01a48c424b1fa440c6999ac1a32a9fbf461098d9 (patch) | |
tree | 52dfab577a7dc86621651328123e65eb6befc0ec | |
parent | 1939631637ed7ac662126a76ef7665e8295ac61d (diff) |
LITMUS: improve core
- give TRACE() messages sequence numbers
- remove a some old, unused cruft
-rw-r--r-- | include/litmus/litmus.h | 34 | ||||
-rw-r--r-- | litmus/litmus.c | 3 |
2 files changed, 7 insertions, 30 deletions
diff --git a/include/litmus/litmus.h b/include/litmus/litmus.h index a4c49111aa..41c86a3217 100644 --- a/include/litmus/litmus.h +++ b/include/litmus/litmus.h | |||
@@ -9,40 +9,14 @@ | |||
9 | #include <linux/jiffies.h> | 9 | #include <linux/jiffies.h> |
10 | #include <litmus/sched_trace.h> | 10 | #include <litmus/sched_trace.h> |
11 | 11 | ||
12 | typedef enum { | ||
13 | SCHED_LINUX = 0, | ||
14 | SCHED_GSN_EDF = 10, | ||
15 | SCHED_PSN_EDF = 11, | ||
16 | /* Add your scheduling policy here */ | ||
17 | |||
18 | SCHED_DEFAULT = 0, | ||
19 | SCHED_INVALID = -1, | ||
20 | } spolicy; | ||
21 | |||
22 | |||
23 | typedef enum { | ||
24 | LITMUS_RESERVED_RANGE = 1024, | ||
25 | |||
26 | } sched_setup_cmd_t; | ||
27 | |||
28 | /* per-task modes */ | ||
29 | enum rt_task_mode_t { | ||
30 | BACKGROUND_TASK = 0, | ||
31 | LITMUS_RT_TASK = 1 | ||
32 | }; | ||
33 | |||
34 | /* Plugin boot options, for convenience */ | ||
35 | #define PLUGIN_LINUX "linux" | ||
36 | #define PLUGIN_GSN_EDF "gsn_edf" | ||
37 | #define PLUGIN_PSN_EDF "psn_edf" | ||
38 | |||
39 | extern spolicy sched_policy; | ||
40 | |||
41 | /* RT mode start time */ | 12 | /* RT mode start time */ |
42 | extern volatile unsigned long rt_start_time; | 13 | extern volatile unsigned long rt_start_time; |
43 | 14 | ||
15 | extern atomic_t __log_seq_no; | ||
16 | |||
44 | #define TRACE(fmt, args...) \ | 17 | #define TRACE(fmt, args...) \ |
45 | sched_trace_log_message("%d: " fmt, raw_smp_processor_id(), ## args) | 18 | sched_trace_log_message("%d P%d: " fmt, atomic_add_return(1, &__log_seq_no), \ |
19 | raw_smp_processor_id(), ## args) | ||
46 | 20 | ||
47 | #define TRACE_TASK(t, fmt, args...) \ | 21 | #define TRACE_TASK(t, fmt, args...) \ |
48 | TRACE("(%s/%d) " fmt, (t)->comm, (t)->pid, ##args) | 22 | TRACE("(%s/%d) " fmt, (t)->comm, (t)->pid, ##args) |
diff --git a/litmus/litmus.c b/litmus/litmus.c index 595f7e847f..2084bb7de8 100644 --- a/litmus/litmus.c +++ b/litmus/litmus.c | |||
@@ -19,6 +19,9 @@ | |||
19 | atomic_t rt_task_count = ATOMIC_INIT(0); | 19 | atomic_t rt_task_count = ATOMIC_INIT(0); |
20 | static DEFINE_SPINLOCK(task_transition_lock); | 20 | static DEFINE_SPINLOCK(task_transition_lock); |
21 | 21 | ||
22 | /* Give log messages sequential IDs. */ | ||
23 | atomic_t __log_seq_no = ATOMIC_INIT(0); | ||
24 | |||
22 | /* To send signals from the scheduler | 25 | /* To send signals from the scheduler |
23 | * Must drop locks first. | 26 | * Must drop locks first. |
24 | */ | 27 | */ |