00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef _XENO_NUCLEUS_TRACE_H
00023 #define _XENO_NUCLEUS_TRACE_H
00024
00025 #define __xntrace_op_max_begin 0
00026 #define __xntrace_op_max_end 1
00027 #define __xntrace_op_max_reset 2
00028 #define __xntrace_op_user_start 3
00029 #define __xntrace_op_user_stop 4
00030 #define __xntrace_op_user_freeze 5
00031 #define __xntrace_op_special 6
00032 #define __xntrace_op_special_u64 7
00033
00034 #if defined(__KERNEL__) || defined(__XENO_SIM__)
00035
00036 #include <asm/xenomai/system.h>
00037
00038 #define xntrace_max_begin(v) xnarch_trace_max_begin(v)
00039 #define xntrace_max_end(v) xnarch_trace_max_end(v)
00040 #define xntrace_max_reset() xnarch_trace_max_reset()
00041 #define xntrace_user_start() xnarch_trace_user_start()
00042 #define xntrace_user_stop(v) xnarch_trace_user_stop(v)
00043 #define xntrace_user_freeze(v, once) xnarch_trace_user_freeze(v, once)
00044 #define xntrace_special(id, v) xnarch_trace_special(id, v)
00045 #define xntrace_special_u64(id, v) xnarch_trace_special_u64(id, v)
00046 #define xntrace_pid(pid, prio) xnarch_trace_pid(pid, prio)
00047 #define xntrace_panic_freeze() xnarch_trace_panic_freeze()
00048 #define xntrace_panic_dump() xnarch_trace_panic_dump()
00049
00050 #else
00051
00052 #include <asm/xenomai/syscall.h>
00053
00054 static inline int xntrace_max_begin(unsigned long v)
00055 {
00056 return XENOMAI_SYSCALL2(__xn_sys_trace, __xntrace_op_max_begin, v);
00057 }
00058
00059 static inline int xntrace_max_end(unsigned long v)
00060 {
00061 return XENOMAI_SYSCALL2(__xn_sys_trace, __xntrace_op_max_end, v);
00062 }
00063
00064 static inline int xntrace_max_reset(void)
00065 {
00066 return XENOMAI_SYSCALL1(__xn_sys_trace, __xntrace_op_max_reset);
00067 }
00068
00069 static inline int xntrace_user_start(void)
00070 {
00071 return XENOMAI_SYSCALL1(__xn_sys_trace, __xntrace_op_user_start);
00072 }
00073
00074 static inline int xntrace_user_stop(unsigned long v)
00075 {
00076 return XENOMAI_SYSCALL2(__xn_sys_trace, __xntrace_op_user_stop, v);
00077 }
00078
00079 static inline int xntrace_user_freeze(unsigned long v, int once)
00080 {
00081 return XENOMAI_SYSCALL3(__xn_sys_trace, __xntrace_op_user_freeze,
00082 v, once);
00083 }
00084
00085 static inline int xntrace_special(unsigned char id, unsigned long v)
00086 {
00087 return XENOMAI_SYSCALL3(__xn_sys_trace, __xntrace_op_special, id, v);
00088 }
00089
00090 static inline int xntrace_special_u64(unsigned char id, unsigned long long v)
00091 {
00092 return XENOMAI_SYSCALL4(__xn_sys_trace, __xntrace_op_special_u64, id,
00093 (unsigned long)(v >> 32),
00094 (unsigned long)(v & 0xFFFFFFFF));
00095 }
00096
00097 #endif
00098
00099 #endif