提交 eb785356 编写于 作者: B Bernard Xiong

[DFS] Add protection for pt->triggered

上级 fe66f24c
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
* Change Logs: * Change Logs:
* Date Author Notes * Date Author Notes
* 2016-12-28 Bernard first version * 2016-12-28 Bernard first version
* 2018-03-09 Bernard Add protection for pt->triggered.
*/ */
#include <stdint.h> #include <stdint.h>
...@@ -118,13 +119,12 @@ static int poll_wait_timeout(struct rt_poll_table *pt, int msec) ...@@ -118,13 +119,12 @@ static int poll_wait_timeout(struct rt_poll_table *pt, int msec)
rt_hw_interrupt_enable(level); rt_hw_interrupt_enable(level);
rt_schedule(); rt_schedule();
}
else level = rt_hw_interrupt_disable();
{
rt_hw_interrupt_enable(level);
} }
ret = !pt->triggered; ret = !pt->triggered;
rt_hw_interrupt_enable(level);
return ret; return ret;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册