summaryrefslogtreecommitdiff
path: root/src/ipc.c
diff options
context:
space:
mode:
author[email protected] <[email protected]>2012-12-20 07:25:19 +0000
committer[email protected] <[email protected]>2012-12-20 07:25:19 +0000
commit0e40d55d9f6894aec2dfc844e8ea89756b0306fe (patch)
tree6e8b5aeb4b1c4e9dc424918a1a9a2f9439c7ee2b /src/ipc.c
parentba4aa585a464893b01279d8724142002930f73b7 (diff)
fixed the coding style of RT_DEBUG_LOG
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2500 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'src/ipc.c')
-rw-r--r--src/ipc.c49
1 files changed, 28 insertions, 21 deletions
diff --git a/src/ipc.c b/src/ipc.c
index e3db05a6f3..38b2c609ac 100644
--- a/src/ipc.c
+++ b/src/ipc.c
@@ -317,9 +317,10 @@ rt_err_t rt_sem_take(rt_sem_t sem, rt_int32_t time)
/* disable interrupt */
temp = rt_hw_interrupt_disable();
- RT_DEBUG_LOG(RT_DEBUG_IPC,
- ("thread %s take sem:%s, which value is: %d\n", rt_thread_self()->name,
- ((struct rt_object *)sem)->name, sem->value));
+ RT_DEBUG_LOG(RT_DEBUG_IPC, ("thread %s take sem:%s, which value is: %d\n",
+ rt_thread_self()->name,
+ ((struct rt_object *)sem)->name,
+ sem->value));
if (sem->value > 0)
{
@@ -350,7 +351,8 @@ rt_err_t rt_sem_take(rt_sem_t sem, rt_int32_t time)
/* reset thread error number */
thread->error = RT_EOK;
- RT_DEBUG_LOG(RT_DEBUG_IPC, ("sem take: suspend thread - %s\n", thread->name));
+ RT_DEBUG_LOG(RT_DEBUG_IPC, ("sem take: suspend thread - %s\n",
+ thread->name));
/* suspend thread */
rt_ipc_list_suspend(&(sem->parent.suspend_thread),
@@ -359,7 +361,8 @@ rt_err_t rt_sem_take(rt_sem_t sem, rt_int32_t time)
/* has waiting time, start thread timer */
if (time > 0)
{
- RT_DEBUG_LOG(RT_DEBUG_IPC, ("set thread:%s to timer list\n", thread->name));
+ RT_DEBUG_LOG(RT_DEBUG_IPC, ("set thread:%s to timer list\n",
+ thread->name));
/* reset the timeout of thread timer and start it */
rt_timer_control(&(thread->thread_timer), RT_TIMER_CTRL_SET_TIME, &time);
@@ -418,9 +421,10 @@ rt_err_t rt_sem_release(rt_sem_t sem)
/* disable interrupt */
temp = rt_hw_interrupt_disable();
- RT_DEBUG_LOG(RT_DEBUG_IPC,
- ("thread %s releases sem:%s, which value is: %d\n", rt_thread_self()->name,
- ((struct rt_object *)sem)->name, sem->value));
+ RT_DEBUG_LOG(RT_DEBUG_IPC, ("thread %s releases sem:%s, which value is: %d\n",
+ rt_thread_self()->name,
+ ((struct rt_object *)sem)->name,
+ sem->value));
if (!rt_list_isempty(&sem->parent.suspend_thread))
{
@@ -631,8 +635,8 @@ rt_err_t rt_mutex_take(rt_mutex_t mutex, rt_int32_t time)
RT_OBJECT_HOOK_CALL(rt_object_trytake_hook, (&(mutex->parent.parent)));
RT_DEBUG_LOG(RT_DEBUG_IPC,
- ("mutex_take: current thread %s, mutex value: %d, hold: %d\n",
- thread->name, mutex->value, mutex->hold));
+ ("mutex_take: current thread %s, mutex value: %d, hold: %d\n",
+ thread->name, mutex->value, mutex->hold));
/* reset thread error */
thread->error = RT_EOK;
@@ -673,8 +677,8 @@ rt_err_t rt_mutex_take(rt_mutex_t mutex, rt_int32_t time)
else
{
/* mutex is unavailable, push to suspend list */
- RT_DEBUG_LOG(RT_DEBUG_IPC,
- ("mutex_take: suspend thread: %s\n", thread->name));
+ RT_DEBUG_LOG(RT_DEBUG_IPC, ("mutex_take: suspend thread: %s\n",
+ thread->name));
/* change the owner thread priority of mutex */
if (thread->current_priority < mutex->owner->current_priority)
@@ -692,7 +696,8 @@ rt_err_t rt_mutex_take(rt_mutex_t mutex, rt_int32_t time)
if (time > 0)
{
RT_DEBUG_LOG(RT_DEBUG_IPC,
- ("mutex_take: start the timer of thread:%s\n", thread->name));
+ ("mutex_take: start the timer of thread:%s\n",
+ thread->name));
/* reset the timeout of thread timer and start it */
rt_timer_control(&(thread->thread_timer), RT_TIMER_CTRL_SET_TIME, &time);
@@ -752,8 +757,8 @@ rt_err_t rt_mutex_release(rt_mutex_t mutex)
temp = rt_hw_interrupt_disable();
RT_DEBUG_LOG(RT_DEBUG_IPC,
- ("mutex_release:current thread %s, mutex value: %d, hold: %d\n",
- thread->name, mutex->value, mutex->hold));
+ ("mutex_release:current thread %s, mutex value: %d, hold: %d\n",
+ thread->name, mutex->value, mutex->hold));
RT_OBJECT_HOOK_CALL(rt_object_put_hook, (&(mutex->parent.parent)));
@@ -786,7 +791,8 @@ rt_err_t rt_mutex_release(rt_mutex_t mutex)
/* get suspended thread */
thread = rt_list_entry(mutex->parent.suspend_thread.next, struct rt_thread, tlist);
- RT_DEBUG_LOG(RT_DEBUG_IPC, ("mutex_release: resume thread: %s\n", thread->name));
+ RT_DEBUG_LOG(RT_DEBUG_IPC, ("mutex_release: resume thread: %s\n",
+ thread->name));
/* set new owner and priority */
mutex->owner = thread;
@@ -1396,8 +1402,8 @@ rt_err_t rt_mb_send_wait(rt_mailbox_t mb, rt_uint32_t value, rt_int32_t timeout)
/* get the start tick of timer */
tick_delta = rt_tick_get();
- RT_DEBUG_LOG(RT_DEBUG_IPC,
- ("mb_send_wait: start timer of thread:%s\n", thread->name));
+ RT_DEBUG_LOG(RT_DEBUG_IPC, ("mb_send_wait: start timer of thread:%s\n",
+ thread->name));
/* reset the timeout of thread timer and start it */
rt_timer_control(&(thread->thread_timer), RT_TIMER_CTRL_SET_TIME, &timeout);
@@ -1539,8 +1545,8 @@ rt_err_t rt_mb_recv(rt_mailbox_t mb, rt_uint32_t *value, rt_int32_t timeout)
/* get the start tick of timer */
tick_delta = rt_tick_get();
- RT_DEBUG_LOG(RT_DEBUG_IPC,
- ("mb_recv: start timer of thread:%s\n", thread->name));
+ RT_DEBUG_LOG(RT_DEBUG_IPC, ("mb_recv: start timer of thread:%s\n",
+ thread->name));
/* reset the timeout of thread timer and start it */
rt_timer_control(&(thread->thread_timer), RT_TIMER_CTRL_SET_TIME, &timeout);
@@ -2072,7 +2078,8 @@ rt_err_t rt_mq_recv(rt_mq_t mq, void *buffer, rt_size_t size, rt_int32_t timeout
/* get the start tick of timer */
tick_delta = rt_tick_get();
- RT_DEBUG_LOG(RT_DEBUG_IPC, ("set thread:%s to timer list\n", thread->name));
+ RT_DEBUG_LOG(RT_DEBUG_IPC, ("set thread:%s to timer list\n",
+ thread->name));
/* reset the timeout of thread timer and start it */
rt_timer_control(&(thread->thread_timer), RT_TIMER_CTRL_SET_TIME, &timeout);