diff options
| author | dzzxzz <[email protected]> | 2011-09-23 05:57:31 +0000 |
|---|---|---|
| committer | dzzxzz <[email protected]> | 2011-09-23 05:57:31 +0000 |
| commit | 7926109356581168f33aa4908052c6871c0ff8e0 (patch) | |
| tree | 270149d2a27f80304562baf28f218c6d4f49f37d /include/rtdebug.h | |
| parent | 2ab9a1602e40a2096cf620dbd3168090232cc10d (diff) | |
cleanup kernel code
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1722 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'include/rtdebug.h')
| -rw-r--r-- | include/rtdebug.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/include/rtdebug.h b/include/rtdebug.h index d7874b0770..e648050c10 100644 --- a/include/rtdebug.h +++ b/include/rtdebug.h @@ -1,3 +1,13 @@ +/* + * File : rtdebug.h + * This file is part of RT-Thread RTOS + * COPYRIGHT (C) 2006 - 2011, RT-Thread Development Team + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rt-thread.org/license/LICENSE + */ + #ifndef __RTDEBUG_H__ #define __RTDEBUG_H__ @@ -44,18 +54,18 @@ #define RT_DEBUG_CONTEXT_CHECK 1 #endif -#define RT_DEBUG_LOG(type,message) do{ if(type) rt_kprintf message;}while(0) +#define RT_DEBUG_LOG(type,message) do { if (type) rt_kprintf message;} while (0) -#define RT_ASSERT(EX) if (!(EX)) {volatile char dummy=0;\ +#define RT_ASSERT(EX) if (!(EX)) {volatile char dummy = 0;\ rt_kprintf("(%s) assert failed at %s:%d \n", \ - #EX, __FUNCTION__, __LINE__); while (dummy==0);} + #EX, __FUNCTION__, __LINE__); while (dummy == 0);} /* Macro to check current context */ #if RT_DEBUG_CONTEXT_CHECK #define RT_DEBUG_NOT_IN_INTERRUPT do {\ rt_base_t level;\ level = rt_hw_interrupt_disable();\ - if(rt_interrupt_get_nest() != 0){\ + if (rt_interrupt_get_nest() != 0){\ rt_kprintf("Function[%s] shall not used in ISR\n", __FUNCTION__);\ RT_ASSERT(0)}\ rt_hw_interrupt_enable(level);} while (0) |
