From ab4d18a137c82aea546f4a1ec8044284f8a233cb Mon Sep 17 00:00:00 2001 From: Grissiom Date: Mon, 14 Apr 2014 18:01:50 +0800 Subject: [PATCH 1/2] [bsp/taihu] fix the link error The taihu.lds hardcoded the path of start_gcc.o. Change it as the layout of build/ has change by commit a03816ef9aa583bb. --- bsp/taihu/taihu.lds | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsp/taihu/taihu.lds b/bsp/taihu/taihu.lds index 7b4eae28bd..75e2cf762f 100644 --- a/bsp/taihu/taihu.lds +++ b/bsp/taihu/taihu.lds @@ -36,7 +36,7 @@ SECTIONS .text : { - KEEP(build/libcpu/ppc/ppc405/start_gcc.o (.text)) + KEEP(build/kernel/libcpu/ppc/ppc405/start_gcc.o (.text)) *(.text) *(.fixup) From a78e42a7c8b63ef099ef5a3c1c019c4aa227b5ca Mon Sep 17 00:00:00 2001 From: Grissiom Date: Wed, 16 Apr 2014 10:47:30 +0800 Subject: [PATCH 2/2] [mempool] reset the thread->error before suspending thread Time out result and other errors is recorded in thread->error. Dirty error will screw up the error handling code after the thread has been wake up. --- src/mempool.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mempool.c b/src/mempool.c index c9bcd7a45c..05904bfbc7 100644 --- a/src/mempool.c +++ b/src/mempool.c @@ -356,6 +356,8 @@ void *rt_mp_alloc(rt_mp_t mp, rt_int32_t time) /* get current thread */ thread = rt_thread_self(); + thread->error = RT_EOK; + /* need suspend thread */ rt_thread_suspend(thread); rt_list_insert_after(&(mp->suspend_thread), &(thread->tlist));