gator: ARM DS-5.3 Streamline gator driver
[android-sdk/arm-ds5-gator.git] / gator_trace.h
1 /**
2  * Copyright 2010  ARM, Ltd.
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  *
8  */
10 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 32)
11 #       error Kernels prior to 2.6.32 not supported
12 #elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35)
13 #       define GATOR_DEFINE_PROBE(probe_name, proto) \
14                 static void probe_##probe_name(PARAMS(proto))
15 #       define GATOR_REGISTER_TRACE(probe_name) \
16                 register_trace_##probe_name(probe_##probe_name)
17 #       define GATOR_UNREGISTER_TRACE(probe_name) \
18                 unregister_trace_##probe_name(probe_##probe_name)
19 #else
20 #       define GATOR_DEFINE_PROBE(probe_name, proto) \
21                 static void probe_##probe_name(void *data, PARAMS(proto))
22 #       define GATOR_REGISTER_TRACE(probe_name) \
23                 register_trace_##probe_name(probe_##probe_name, NULL)
24 #       define GATOR_UNREGISTER_TRACE(probe_name) \
25                 unregister_trace_##probe_name(probe_##probe_name, NULL)
26 #endif