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

Function lwp_component_init

components/lwp/lwp.c:75–95  ·  view source on GitHub ↗

* @brief Initializes the LWP (Light-Weight Process) component * * @return int Returns RT_EOK if all initializations succeed, otherwise returns * the error code from the first failed initialization * * @note This function performs initialization of various LWP subsystems in sequence: * 1. Thread ID (TID) initialization * 2. Process ID (PID) initialization * 3. Chan

Source from the content-addressed store, hash-verified

73 * 4. Futex (Fast Userspace Mutex) initialization
74 */
75static int lwp_component_init(void)
76{
77 int rc;
78 if ((rc = lwp_tid_init()) != RT_EOK)
79 {
80 LOG_E("%s: lwp_component_init() failed", __func__);
81 }
82 else if ((rc = lwp_pid_init()) != RT_EOK)
83 {
84 LOG_E("%s: lwp_pid_init() failed", __func__);
85 }
86 else if ((rc = rt_channel_component_init()) != RT_EOK)
87 {
88 LOG_E("%s: rt_channel_component_init failed", __func__);
89 }
90 else if ((rc = lwp_futex_init()) != RT_EOK)
91 {
92 LOG_E("%s: lwp_futex_init() failed", __func__);
93 }
94 return rc;
95}
96INIT_COMPONENT_EXPORT(lwp_component_init);
97
98/**

Callers

nothing calls this directly

Calls 4

lwp_tid_initFunction · 0.85
lwp_pid_initFunction · 0.85
lwp_futex_initFunction · 0.85

Tested by

no test coverage detected