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

Function dlmodule_self

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

* @brief retrieve the dynamically loaded module that the current thread belongs to. * * @return struct rt_dlmodule* On success, it returns a pointer to the module. otherwise, it returns RT_NULL. */

Source from the content-addressed store, hash-verified

410 * @return struct rt_dlmodule* On success, it returns a pointer to the module. otherwise, it returns RT_NULL.
411 */
412struct rt_dlmodule *dlmodule_self(void)
413{
414 rt_thread_t tid;
415 struct rt_dlmodule *ret = RT_NULL;
416
417 tid = rt_thread_self();
418 if (tid)
419 {
420 ret = (struct rt_dlmodule*) tid->parent.module_id;
421 }
422
423 return ret;
424}
425
426/*
427 * Compatible with old API

Callers 6

_dlmodule_exitFunction · 0.85
rt_module_selfFunction · 0.85
dlmodule_exitFunction · 0.85
rt_assert_handlerFunction · 0.85
rt_object_initFunction · 0.85
rt_object_allocateFunction · 0.85

Calls 1

rt_thread_selfFunction · 0.85

Tested by

no test coverage detected