* @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
| 73 | * 4. Futex (Fast Userspace Mutex) initialization |
| 74 | */ |
| 75 | static 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 | } |
| 96 | INIT_COMPONENT_EXPORT(lwp_component_init); |
| 97 | |
| 98 | /** |
nothing calls this directly
no test coverage detected