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

fix the rt_ipc_object_suspend issue when IPC flag is RT_IPC_FLAG_PRIO

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@201 bbd45198-f89e-11dd-88c7-29a3b14d5316
上级 e1a2102e
......@@ -28,6 +28,8 @@
* 2009-10-10 Bernard change semaphore and mutex value to unsigned value
* 2009-10-25 Bernard change the mb/mq receive timeout to 0 if the
* re-calculated delta tick is a negative number.
* 2009-12-16 Bernard fix the rt_ipc_object_suspend issue when IPC flag
* is RT_IPC_FLAG_PRIO
*/
#include <rtthread.h>
......@@ -98,10 +100,13 @@ rt_inline rt_err_t rt_ipc_object_suspend(struct rt_ipc_object *ipc, struct rt_th
sthread = rt_list_entry(n, struct rt_thread, tlist);
/* find out */
if (thread->current_priority < sthread->current_priority) break;
if (thread->current_priority < sthread->current_priority)
{
/* insert this thread before the sthread */
rt_list_insert_before(&(sthread->tlist), &(thread->tlist));
break;
}
}
rt_list_insert_before(&(ipc->suspend_thread), &(thread->tlist));
}
break;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册