diff options
author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2009-12-08 10:42:39 -0500 |
---|---|---|
committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2009-12-08 12:44:49 -0500 |
commit | f043ca3a785750091f6a73b6625b6b7a5a5d19f6 (patch) | |
tree | 5f919ae5968d0c41066edc770ddb825440f3f611 /include/litmus | |
parent | f369d531a5add5bd978a5c41fdb9fd607038e51b (diff) |
Add tracing support.
(KConfig still missing.)
fix sched_trace printk hooks (to be merged)
Fix feather-trace generic impl. (to be merged)
Diffstat (limited to 'include/litmus')
-rw-r--r-- | include/litmus/feather_trace.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/litmus/feather_trace.h b/include/litmus/feather_trace.h index 3ac1ee5e0277..eef8af7a414e 100644 --- a/include/litmus/feather_trace.h +++ b/include/litmus/feather_trace.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef _FEATHER_TRACE_H_ | 1 | #ifndef _FEATHER_TRACE_H_ |
2 | #define _FEATHER_TRACE_H_ | 2 | #define _FEATHER_TRACE_H_ |
3 | 3 | ||
4 | #include <asm/feather_trace.h> | ||
4 | 5 | ||
5 | int ft_enable_event(unsigned long id); | 6 | int ft_enable_event(unsigned long id); |
6 | int ft_disable_event(unsigned long id); | 7 | int ft_disable_event(unsigned long id); |
@@ -30,6 +31,19 @@ extern int ft_events[MAX_EVENTS]; | |||
30 | 31 | ||
31 | #define ft_event3(id, callback, p, p2, p3) \ | 32 | #define ft_event3(id, callback, p, p2, p3) \ |
32 | if (ft_events[id]) callback(id, p, p2, p3); | 33 | if (ft_events[id]) callback(id, p, p2, p3); |
34 | |||
35 | #include <asm/atomic.h> | ||
36 | |||
37 | static inline int fetch_and_inc(int *val) | ||
38 | { | ||
39 | return atomic_add_return(1, (atomic_t*) val) - 1; | ||
40 | } | ||
41 | |||
42 | static inline int fetch_and_dec(int *val) | ||
43 | { | ||
44 | return atomic_sub_return(1, (atomic_t*) val) + 1; | ||
45 | } | ||
46 | |||
33 | #endif | 47 | #endif |
34 | 48 | ||
35 | 49 | ||