Xenomai API  2.6.5
trace.h
1 /*
2  * Copyright (C) 2006 Jan Kiszka <[email protected]>.
3  *
4  * Xenomai is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published
6  * by the Free Software Foundation; either version 2 of the License,
7  * or (at your option) any later version.
8  *
9  * Xenomai is distributed in the hope that it will be useful, but
10  * WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with Xenomai; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
17  * 02111-1307, USA.
18  *
19  * User-space interface to the arch-specific tracing support.
20  */
21 
22 #ifndef _XENO_NUCLEUS_TRACE_H
23 #define _XENO_NUCLEUS_TRACE_H
24 
25 #define __xntrace_op_max_begin 0
26 #define __xntrace_op_max_end 1
27 #define __xntrace_op_max_reset 2
28 #define __xntrace_op_user_start 3
29 #define __xntrace_op_user_stop 4
30 #define __xntrace_op_user_freeze 5
31 #define __xntrace_op_special 6
32 #define __xntrace_op_special_u64 7
33 
34 #if defined(__KERNEL__) || defined(__XENO_SIM__)
35 
36 #include <asm/xenomai/system.h>
37 
38 #define xntrace_max_begin(v) xnarch_trace_max_begin(v)
39 #define xntrace_max_end(v) xnarch_trace_max_end(v)
40 #define xntrace_max_reset() xnarch_trace_max_reset()
41 #define xntrace_user_start() xnarch_trace_user_start()
42 #define xntrace_user_stop(v) xnarch_trace_user_stop(v)
43 #define xntrace_user_freeze(v, once) xnarch_trace_user_freeze(v, once)
44 #define xntrace_special(id, v) xnarch_trace_special(id, v)
45 #define xntrace_special_u64(id, v) xnarch_trace_special_u64(id, v)
46 #define xntrace_pid(pid, prio) xnarch_trace_pid(pid, prio)
47 #define xntrace_panic_freeze() xnarch_trace_panic_freeze()
48 #define xntrace_panic_dump() xnarch_trace_panic_dump()
49 
50 #else /* !(defined(__KERNEL__) || defined(__XENO_SIM__)) */
51 
52 #include <asm-generic/xenomai/syscall.h>
53 #include <asm/xenomai/tsc.h>
54 
55 int xntrace_max_begin(unsigned long v);
56 
57 int xntrace_max_end(unsigned long v);
58 
59 int xntrace_max_reset(void);
60 
61 int xntrace_user_start(void);
62 
63 int xntrace_user_stop(unsigned long v);
64 
65 int xntrace_user_freeze(unsigned long v, int once);
66 
67 int xntrace_special(unsigned char id, unsigned long v);
68 
69 int xntrace_special_u64(unsigned char id, unsigned long long v);
70 
71 #endif /* defined(__KERNEL__) || defined(__XENO_SIM__) */
72 
73 #endif /* !_XENO_NUCLEUS_TRACE_H */