Xenomai API
2.5.6.1
|
00001 /* 00002 * Copyright (C) 2006 Jan Kiszka <[email protected]>. 00003 * 00004 * Xenomai is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published 00006 * by the Free Software Foundation; either version 2 of the License, 00007 * or (at your option) any later version. 00008 * 00009 * Xenomai is distributed in the hope that it will be useful, but 00010 * WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 * General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with Xenomai; if not, write to the Free Software 00016 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 00017 * 02111-1307, USA. 00018 * 00019 * User-space interface to the arch-specific tracing support. 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 /* !(defined(__KERNEL__) || defined(__XENO_SIM__)) */ 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 /* defined(__KERNEL__) || defined(__XENO_SIM__) */ 00098 00099 #endif /* !_XENO_NUCLEUS_TRACE_H */