summaryrefslogtreecommitdiff
path: root/src/scheduler.c
diff options
context:
space:
mode:
authorbernard.xiong <[email protected]>2010-07-13 07:36:37 +0000
committerbernard.xiong <[email protected]>2010-07-13 07:36:37 +0000
commit214e44c3f9d79e34719cd9cef5e2fc596a693d47 (patch)
tree5270f946a824b0d54689953aca65d6039ffaee3b /src/scheduler.c
parent69466590ff78faa11ed508d74a5509113b8dace0 (diff)
fix down alignment issue; fix the maximal number of rt_scheduler_lock_nest issue; fix rt_tick_from_millisecond issue.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@790 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'src/scheduler.c')
-rw-r--r--src/scheduler.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/scheduler.c b/src/scheduler.c
index e5c82279cb..be71234370 100644
--- a/src/scheduler.c
+++ b/src/scheduler.c
@@ -19,7 +19,9 @@
* 2006-09-05 Bernard add 32 priority level support
* 2006-09-24 Bernard add rt_system_scheduler_start function
* 2009-09-16 Bernard fix _rt_scheduler_stack_check
- * 2010-04-11 yi.qiu add module feature
+ * 2010-04-11 yi.qiu add module feature
+ * 2010-07-13 Bernard fix the maximal number of rt_scheduler_lock_nest
+ * issue found by kuronca
*/
#include <rtthread.h>
@@ -396,8 +398,9 @@ void rt_enter_critical()
/* disable interrupt */
level = rt_hw_interrupt_disable();
- if (rt_scheduler_lock_nest < 255u)
- rt_scheduler_lock_nest++;
+ /* the maximal number of nest is RT_UINT16_MAX, which is big
+ * enough and does not check here */
+ rt_scheduler_lock_nest++;
/* enable interrupt */
rt_hw_interrupt_enable(level);