提交 ab5a04e0 编写于 作者: B bernard.xiong

cleanup code for IAR compiler

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@50 bbd45198-f89e-11dd-88c7-29a3b14d5316
上级 8e765942
......@@ -31,12 +31,12 @@ sys_sem_t sys_sem_new(u8_t count)
rt_snprintf(tname, RT_NAME_MAX, "%s%d", SYS_LWIP_SEM_NAME, counter);
#ifdef LWIP_DEBUG
#if SYS_DEBUG
{
struct rt_thread *thread;
thread = rt_thread_self();
LWIP_DEBUGF(TCPIP_DEBUG, ("%s, Create sem: %s \n",thread->name, tname));
LWIP_DEBUGF(SYS_DEBUG, ("%s, Create sem: %s \n",thread->name, tname));
}
#endif
......@@ -47,12 +47,12 @@ sys_sem_t sys_sem_new(u8_t count)
void sys_sem_free(sys_sem_t sem)
{
#ifdef LWIP_DEBUG
#if SYS_DEBUG
{
struct rt_thread *thread;
thread = rt_thread_self();
LWIP_DEBUGF(TCPIP_DEBUG, ("%s, Delete sem: %s \n",thread->name,
LWIP_DEBUGF(SYS_DEBUG, ("%s, Delete sem: %s \n",thread->name,
sem->parent.parent.name));
}
#endif
......@@ -64,12 +64,12 @@ void sys_sem_free(sys_sem_t sem)
void sys_sem_signal(sys_sem_t sem)
{
#ifdef LWIP_DEBUG
#if SYS_DEBUG
{
struct rt_thread *thread;
thread = rt_thread_self();
LWIP_DEBUGF(TCPIP_DEBUG, ("%s, Release signal: %s , %d\n",thread->name,
LWIP_DEBUGF(SYS_DEBUG, ("%s, Release signal: %s , %d\n",thread->name,
sem->parent.parent.name, sem->value));
}
#endif
......@@ -87,12 +87,12 @@ u32_t sys_arch_sem_wait(sys_sem_t sem, u32_t timeout)
/* get the begin tick */
tick = rt_tick_get();
#ifdef LWIP_DEBUG
#if SYS_DEBUG
{
struct rt_thread *thread;
thread = rt_thread_self();
LWIP_DEBUGF(TCPIP_DEBUG, ("%s, Wait sem: %s , %d\n",thread->name,
LWIP_DEBUGF(SYS_DEBUG, ("%s, Wait sem: %s , %d\n",thread->name,
sem->parent.parent.name, sem->value));
}
#endif
......@@ -128,12 +128,12 @@ sys_mbox_t sys_mbox_new(int size)
rt_snprintf(tname, RT_NAME_MAX, "%s%d", SYS_LWIP_MBOX_NAME, counter);
#ifdef LWIP_DEBUG
#if SYS_DEBUG
{
struct rt_thread *thread;
thread = rt_thread_self();
LWIP_DEBUGF(TCPIP_DEBUG, ("%s, Create mbox: %s \n",thread->name, tname));
LWIP_DEBUGF(SYS_DEBUG, ("%s, Create mbox: %s \n",thread->name, tname));
}
#endif
......@@ -144,12 +144,12 @@ sys_mbox_t sys_mbox_new(int size)
void sys_mbox_free(sys_mbox_t mbox)
{
#ifdef LWIP_DEBUG
#if SYS_DEBUG
{
struct rt_thread *thread;
thread = rt_thread_self();
LWIP_DEBUGF(TCPIP_DEBUG, ("%s, Delete mbox: %s\n",thread->name,
LWIP_DEBUGF(SYS_DEBUG, ("%s, Delete mbox: %s\n",thread->name,
mbox->parent.parent.name));
}
#endif
......@@ -161,12 +161,12 @@ void sys_mbox_free(sys_mbox_t mbox)
void sys_mbox_post(sys_mbox_t mbox, void *msg)
{
#ifdef LWIP_DEBUG
#if SYS_DEBUG
{
struct rt_thread *thread;
thread = rt_thread_self();
LWIP_DEBUGF(TCPIP_DEBUG, ("%s, Post mail: %s ,0x%x\n",thread->name,
LWIP_DEBUGF(SYS_DEBUG, ("%s, Post mail: %s ,0x%x\n",thread->name,
mbox->parent.parent.name, (rt_uint32_t)msg));
}
#endif
......@@ -178,12 +178,12 @@ void sys_mbox_post(sys_mbox_t mbox, void *msg)
err_t sys_mbox_trypost(sys_mbox_t mbox, void *msg)
{
#ifdef LWIP_DEBUG
#if SYS_DEBUG
{
struct rt_thread *thread;
thread = rt_thread_self();
LWIP_DEBUGF(TCPIP_DEBUG, ("%s, Post mail: %s ,0x%x\n",thread->name,
LWIP_DEBUGF(SYS_DEBUG, ("%s, Post mail: %s ,0x%x\n",thread->name,
mbox->parent.parent.name, (rt_uint32_t)msg));
}
#endif
......@@ -216,12 +216,12 @@ u32_t sys_arch_mbox_fetch(sys_mbox_t mbox, void **msg, u32_t timeout)
if(ret == -RT_ETIMEOUT) return SYS_ARCH_TIMEOUT;
else if (ret == RT_EOK) ret = 1;
#ifdef LWIP_DEBUG
#if SYS_DEBUG
{
struct rt_thread *thread;
thread = rt_thread_self();
LWIP_DEBUGF(TCPIP_DEBUG, ("%s, Fetch mail: %s , 0x%x\n",thread->name,
LWIP_DEBUGF(SYS_DEBUG, ("%s, Fetch mail: %s , 0x%x\n",thread->name,
mbox->parent.parent.name, *(rt_uint32_t **)msg));
}
#endif
......@@ -245,12 +245,12 @@ u32_t sys_arch_mbox_tryfetch(sys_mbox_t mbox, void **msg)
if(ret == -RT_ETIMEOUT) return SYS_ARCH_TIMEOUT;
else if (ret == RT_EOK) ret = 1;
#ifdef LWIP_DEBUG
#if SYS_DEBUG
{
struct rt_thread *thread;
thread = rt_thread_self();
LWIP_DEBUGF(TCPIP_DEBUG, ("%s, Fetch mail: %s , 0x%x\n",thread->name,
LWIP_DEBUGF(SYS_DEBUG, ("%s, Fetch mail: %s , 0x%x\n",thread->name,
mbox->parent.parent.name, *(rt_uint32_t **)msg));
}
#endif
......
......@@ -5,7 +5,6 @@
#include "lwip/debug.h"
#include "lwip/mem.h"
#include "lwip/memp.h"
#include "lwip/sys.h"
#include "lwip/stats.h"
#include "lwip/tcpip.h"
......
......@@ -40,7 +40,7 @@
#define LWIP_PLATFORM_BYTESWAP 0
#define BYTE_ORDER LITTLE_ENDIAN
// #define RT_LWIP_DEBUG
/* #define RT_LWIP_DEBUG */
#ifdef RT_LWIP_DEBUG
#define LWIP_DEBUG
......@@ -52,7 +52,7 @@
#define ETHARP_DEBUG LWIP_DBG_OFF
#define PPP_DEBUG LWIP_DBG_OFF
#define MEM_DEBUG LWIP_DBG_OFF
#define MEMP_DEBUG LWIP_DBG_ON
#define MEMP_DEBUG LWIP_DBG_OFF
#define PBUF_DEBUG LWIP_DBG_OFF
#define API_LIB_DEBUG LWIP_DBG_OFF
#define API_MSG_DEBUG LWIP_DBG_OFF
......@@ -63,8 +63,8 @@
#define AUTOIP_DEBUG LWIP_DBG_OFF
#define DHCP_DEBUG LWIP_DBG_OFF
#define IP_DEBUG LWIP_DBG_OFF
#define IP_REASS_DEBUG LWIP_DBG_OFF
#define ICMP_DEBUG LWIP_DBG_OFF
#define IP_REASS_DEBUG LWIP_DBG_ON
#define ICMP_DEBUG LWIP_DBG_ON
#define IGMP_DEBUG LWIP_DBG_OFF
#define UDP_DEBUG LWIP_DBG_OFF
#define TCP_DEBUG LWIP_DBG_OFF
......@@ -84,9 +84,9 @@
#define MEM_ALIGNMENT RT_ALIGN_SIZE
#define MEM_LIBC_MALLOC 1
#define malloc rt_malloc
#define free rt_free
#define calloc rt_calloc
#define mem_malloc rt_malloc
#define mem_free rt_free
#define mem_calloc rt_calloc
/* MEMP_NUM_PBUF: the number of memp struct pbufs. If the application
sends a lot of data out of ROM (or other static memory), this
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册