cleanup code in ipc.c and idle.c

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1713 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
dzzxzz 2011-09-19 07:15:31 +00:00
parent 865c1d4df0
commit 405678552d
2 changed files with 88 additions and 99 deletions

View File

@ -1,7 +1,7 @@
/*
* File : idle.c
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2006 - 2009, RT-Thread Development Team
* 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
@ -164,7 +164,7 @@ static void rt_thread_idle_entry(void* parameter)
*
* @note this function must be invoked when system init.
*/
void rt_thread_idle_init()
void rt_thread_idle_init(void)
{
/* init thread */
rt_thread_init(&idle,

View File

@ -1,7 +1,7 @@
/*
* File : ipc.c
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2006 - 2009, RT-Thread Development Team
* 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
@ -180,7 +180,6 @@ rt_inline rt_err_t rt_ipc_list_resume_all(rt_list_t *list)
}
#ifdef RT_USING_SEMAPHORE
/**
* This function will initialize a semaphore and put it under control of resource
* management.
@ -471,11 +470,9 @@ rt_err_t rt_sem_control(rt_sem_t sem, rt_uint8_t cmd, void* arg)
return -RT_ERROR;
}
#endif /* end of RT_USING_SEMAPHORE */
#ifdef RT_USING_MUTEX
/**
* This function will initialize a mutex and put it under control of resource
* management.
@ -817,11 +814,9 @@ rt_err_t rt_mutex_control(rt_mutex_t mutex, rt_uint8_t cmd, void* arg)
{
return -RT_ERROR;
}
#endif /* end of RT_USING_MUTEX */
#ifdef RT_USING_EVENT
/**
* This function will initialize an event and put it under control of resource
* management.
@ -1002,7 +997,6 @@ rt_err_t rt_event_send(rt_event_t event, rt_uint32_t set)
/* need do a scheduling */
need_schedule = RT_TRUE;
}
}
}
@ -1154,11 +1148,9 @@ rt_err_t rt_event_control (rt_event_t event, rt_uint8_t cmd, void* arg)
return -RT_ERROR;
}
#endif /* end of RT_USING_EVENT */
#ifdef RT_USING_MAILBOX
/**
* This function will initialize a mailbox and put it under control of resource
* management.
@ -1604,11 +1596,9 @@ rt_err_t rt_mb_control(rt_mailbox_t mb, rt_uint8_t cmd, void* arg)
return -RT_ERROR;
}
#endif /* end of RT_USING_MAILBOX */
#ifdef RT_USING_MESSAGEQUEUE
struct rt_mq_message
{
struct rt_mq_message* next;
@ -2119,6 +2109,5 @@ rt_err_t rt_mq_control(rt_mq_t mq, rt_uint8_t cmd, void* arg)
return -RT_ERROR;
}
#endif /* end of RT_USING_MESSAGEQUEUE */
/*@}*/