summaryrefslogtreecommitdiff
path: root/src/scheduler.c
diff options
context:
space:
mode:
authorqiuyiuestc <[email protected]>2010-04-16 00:53:48 +0000
committerqiuyiuestc <[email protected]>2010-04-16 00:53:48 +0000
commit0d7a1c0be7f6e6ab561ef982f4efd9f7f04ab1ee (patch)
tree27a431d9c825741e39813d396f6f33b0b08ec425 /src/scheduler.c
parent99213611623be97274eb19bfa23aca8abcf9d19c (diff)
module developing
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@625 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'src/scheduler.c')
-rw-r--r--src/scheduler.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/scheduler.c b/src/scheduler.c
index fdfd4289e1..e5c82279cb 100644
--- a/src/scheduler.c
+++ b/src/scheduler.c
@@ -19,6 +19,7 @@
* 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
*/
#include <rtthread.h>
@@ -264,8 +265,8 @@ void rt_schedule()
rt_current_thread = to_thread;
#ifdef RT_USING_MODULE
- if(rt_current_thread->module_parent != RT_NULL)
- rt_current_module = rt_current_thread->module_parent;
+ rt_current_module = (rt_current_thread->module_parent != RT_NULL) ?
+ rt_current_thread->module_parent : RT_NULL;
#endif
#ifdef RT_USING_HOOK