diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2009-12-17 21:23:36 -0500 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-29 17:05:45 -0400 |
commit | 4b38febbd59fd33542a343991262119eb9860f5e (patch) | |
tree | 1af88a0d354abe344c2c2869631f76a1806d75c3 /include/litmus/feather_trace.h | |
parent | 22763c5cf3690a681551162c15d34d935308c8d7 (diff) |
[ported from 2008.3] Core LITMUS^RT infrastructure
Port 2008.3 Core LITMUS^RT infrastructure to Linux 2.6.32
litmus_sched_class implements 4 new methods:
- prio_changed:
void
- switched_to:
void
- get_rr_interval:
return infinity (i.e., 0)
- select_task_rq:
return current cpu
Diffstat (limited to 'include/litmus/feather_trace.h')
-rw-r--r-- | include/litmus/feather_trace.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/include/litmus/feather_trace.h b/include/litmus/feather_trace.h new file mode 100644 index 000000000000..3ac1ee5e0277 --- /dev/null +++ b/include/litmus/feather_trace.h | |||
@@ -0,0 +1,36 @@ | |||
1 | #ifndef _FEATHER_TRACE_H_ | ||
2 | #define _FEATHER_TRACE_H_ | ||
3 | |||
4 | |||
5 | int ft_enable_event(unsigned long id); | ||
6 | int ft_disable_event(unsigned long id); | ||
7 | int ft_is_event_enabled(unsigned long id); | ||
8 | int ft_disable_all_events(void); | ||
9 | |||
10 | #ifndef __ARCH_HAS_FEATHER_TRACE | ||
11 | /* provide default implementation */ | ||
12 | |||
13 | #define feather_callback | ||
14 | |||
15 | #define MAX_EVENTS 1024 | ||
16 | |||
17 | extern int ft_events[MAX_EVENTS]; | ||
18 | |||
19 | #define ft_event(id, callback) \ | ||
20 | if (ft_events[id]) callback(); | ||
21 | |||
22 | #define ft_event0(id, callback) \ | ||
23 | if (ft_events[id]) callback(id); | ||
24 | |||
25 | #define ft_event1(id, callback, param) \ | ||
26 | if (ft_events[id]) callback(id, param); | ||
27 | |||
28 | #define ft_event2(id, callback, param, param2) \ | ||
29 | if (ft_events[id]) callback(id, param, param2); | ||
30 | |||
31 | #define ft_event3(id, callback, p, p2, p3) \ | ||
32 | if (ft_events[id]) callback(id, p, p2, p3); | ||
33 | #endif | ||
34 | |||
35 | |||
36 | #endif | ||