diff options
| author | Bernard Xiong <[email protected]> | 2017-12-12 07:38:02 +0800 |
|---|---|---|
| committer | Bernard Xiong <[email protected]> | 2017-12-12 07:38:02 +0800 |
| commit | a3d96ed555a411e927d14ce2d95be0203d041fb7 (patch) | |
| tree | 9549e5a1eb9905b1a7efb8836df9e8bb2ec5045a /bsp | |
| parent | 2f409c85f1faf3662c9ee99eed78e460286ec046 (diff) | |
Use rt_object_get_information to get object chain
Diffstat (limited to 'bsp')
| -rw-r--r-- | bsp/simulator/drivers/module_win32.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bsp/simulator/drivers/module_win32.c b/bsp/simulator/drivers/module_win32.c index 0c998eed2c..8fcf3ef2fe 100644 --- a/bsp/simulator/drivers/module_win32.c +++ b/bsp/simulator/drivers/module_win32.c @@ -164,15 +164,15 @@ rt_module_t rt_module_find(const char *name) struct rt_object *object; struct rt_list_node *node; - extern struct rt_object_information rt_object_container[]; - RT_DEBUG_NOT_IN_INTERRUPT; /* enter critical */ rt_enter_critical(); /* try to find device object */ - information = &rt_object_container[RT_Object_Class_Module]; + information = rt_object_get_information(RT_Object_Class_Module); + RT_ASSERT(information != RT_NULL); + for (node = information->object_list.next; node != &(information->object_list); node = node->next) |
