From 29fd52dfb81fbf452a05949003f8e97aa6775ef3 Mon Sep 17 00:00:00 2001 From: KodakWang Date: Tue, 24 Mar 2015 15:54:08 +0800 Subject: [PATCH] Update completion.c fix: completion wait after, maybe can't clean the flag. --- components/drivers/src/completion.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/drivers/src/completion.c b/components/drivers/src/completion.c index f49e44c48f..48afc2ee34 100644 --- a/components/drivers/src/completion.c +++ b/components/drivers/src/completion.c @@ -95,10 +95,10 @@ rt_err_t rt_completion_wait(struct rt_completion *completion, result = thread->error; level = rt_hw_interrupt_disable(); - /* clean completed flag */ - completion->flag = RT_UNCOMPLETED; } } + /* clean completed flag */ + completion->flag = RT_UNCOMPLETED; __exit: rt_hw_interrupt_enable(level);