rtai-core/include/asm-arm/rtai_debug.h

00001 /* 020222 asm-arm/rtai_debug.h
00002 
00003 Copyright (c) 2003, Thomas Gleixner, <tglx@linutronix.de)
00004 COPYRIGHT (C) 2002 Guennadi Liakhovetski, DSA GmbH (gl@dsa-ac.de)
00005 
00006 This program is free software; you can redistribute it and/or modify
00007 it under the terms of version 2 of the GNU General Public License as
00008 published by the Free Software Foundation.
00009 
00010 This program is distributed in the hope that it will be useful,
00011 but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 GNU General Public License for more details.
00014 
00015 You should have received a copy of the GNU General Public License
00016 along with this program; if not, write to the Free Software
00017 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 */
00019 /*
00020 --------------------------------------------------------------------------
00021 Acknowledgements
00022 - Paolo Mantegazza      (mantegazza@aero.polimi.it)
00023         creator of RTAI 
00024 */
00025 
00026 #ifndef _ASM_RTAI_DEBUG_H_
00027 #define _ASM_RTAI_DEBUG_H_
00028 
00029 #define RT_DEBUG_LEVEL 0
00030 #if RT_DEBUG_LEVEL > 0
00031 #define D1(x) x
00032 #else
00033 #define D1(x)
00034 #endif
00035 #if RT_DEBUG_LEVEL > 1
00036 #define D2(x) x
00037 #else
00038 #define D2(x)
00039 #endif
00040 
00041 #define LL_SPLIT(x) ((unsigned long*)&(x))[1], ((unsigned long*)&(x))[0]
00042 
00043 #define RTAI_SCHED_PROC_DEBUG_DEF \
00044         union { \
00045                 RTIME tsc; \
00046                 unsigned long hltsc[2]; \
00047         } tsc
00048 
00049 #define RT_TIMES_DEBUG(fmt, args...) fmt \
00050                 "\n OSCR 0X%08X, tsc 0X%08lX%08lX," \
00051                 "\n intr_time 0X%08lX%08lX, tick_time 0X%08lX%08lX," \
00052                 "\n OSMR0: 0X%08X, periodic_tick 0X%08X," \
00053                 "\n linux_time 0X%08lX%08lX, linux_tick 0X%08X\n" , \
00054                 ## args, OSCR, rtai_tsc.hltsc[1], rtai_tsc.hltsc[0], \
00055                 ((unsigned long*)&rt_times.intr_time)[1], \
00056                 ((unsigned long*)&rt_times.intr_time)[0], \
00057                 ((unsigned long*)&rt_times.tick_time)[1], \
00058                 ((unsigned long*)&rt_times.tick_time)[0], \
00059                 OSMR0, rt_times.periodic_tick, \
00060                 ((unsigned long*)&rt_times.linux_time)[1], \
00061                 ((unsigned long*)&rt_times.linux_time)[0], \
00062                 rt_times.linux_tick
00063 
00064 #define RTAI_SCHED_PROC_DEBUG \
00065         PROC_PRINT( RT_TIMES_DEBUG( "Saved OSCR 0X%08lX, next_match 0X%08lX, " \
00066                 "timer crashes %lu, latency %d,\n" \
00067                 "setup_time_TIMER_CPUNIT %d, setup_time_TIMER_UNIT %d,", \
00068                 _oscr, next_match, rtai_timer_crash, \
00069                 tuned.latency, tuned.setup_time_TIMER_CPUNIT, \
00070                 tuned.setup_time_TIMER_UNIT ) )
00071 
00072 #endif

Generated on Sat Jul 24 19:36:02 2004 for RTAI API by doxygen 1.3.4