* @brief create a dynamic module object and initialize it. * * @return struct rt_dlmodule* If module create successfully, return the pointer to its rt_dlmodule structure. */
| 182 | * @return struct rt_dlmodule* If module create successfully, return the pointer to its rt_dlmodule structure. |
| 183 | */ |
| 184 | struct rt_dlmodule *dlmodule_create(void) |
| 185 | { |
| 186 | struct rt_dlmodule *module = RT_NULL; |
| 187 | |
| 188 | module = (struct rt_dlmodule*) rt_object_allocate(RT_Object_Class_Module, "module"); |
| 189 | if (module) |
| 190 | { |
| 191 | module->stat = RT_DLMODULE_STAT_INIT; |
| 192 | |
| 193 | /* set initial priority and stack size */ |
| 194 | module->priority = RT_THREAD_PRIORITY_MAX - 1; |
| 195 | module->stack_size = 2048; |
| 196 | |
| 197 | rt_list_init(&(module->object_list)); |
| 198 | } |
| 199 | |
| 200 | return module; |
| 201 | } |
| 202 | |
| 203 | void dlmodule_destroy_subthread(struct rt_dlmodule *module, rt_thread_t thread) |
| 204 | { |
no test coverage detected