MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / dlmodule_create

Function dlmodule_create

components/libc/posix/libdl/dlmodule.c:184–201  ·  view source on GitHub ↗

* @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. */

Source from the content-addressed store, hash-verified

182 * @return struct rt_dlmodule* If module create successfully, return the pointer to its rt_dlmodule structure.
183 */
184struct 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
203void dlmodule_destroy_subthread(struct rt_dlmodule *module, rt_thread_t thread)
204{

Callers 2

dlmodule_loadFunction · 0.85
dlmodule_load_customFunction · 0.85

Calls 2

rt_object_allocateFunction · 0.85
rt_list_initFunction · 0.85

Tested by

no test coverage detected