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

Function rt_components_init

libcpu/sim/win32/startup_msvc.c:185–215  ·  view source on GitHub ↗

* RT-Thread Components Initialization */

Source from the content-addressed store, hash-verified

183 * RT-Thread Components Initialization
184 */
185void rt_components_init(void)
186{
187 const char* lv_start = ".rti_fn.1.end";
188 const char* lv_end = ".rti_fn.6.end";
189 int result;
190 rt_size_t index_i;
191
192 rt_init_objects_sort();
193
194 for (index_i = 0; index_i < rt_init_num; index_i++)
195 {
196 if (rt_init_table[index_i].fn)
197 {
198 if (rt_strcmp(rt_init_table[index_i].level, lv_start) <= 0)
199 {
200 continue;
201 }
202 if (rt_strcmp(rt_init_table[index_i].level, lv_end) >= 0)
203 {
204 break;
205 }
206#ifdef RT_DEBUGING_AUTO_INIT
207 rt_kprintf("initialize %s", rt_init_table[index_i].fn_name);
208 result = rt_init_table[index_i].fn();
209 rt_kprintf(":%d done\n", result);
210#else
211 result = rt_init_table[index_i].fn();
212#endif
213 }
214 }
215}
216#endif /* RT_USING_COMPONENTS_INIT */
217
218#ifdef RT_USING_USER_MAIN

Callers 1

main_thread_entryFunction · 0.70

Calls 3

rt_init_objects_sortFunction · 0.85
rt_strcmpFunction · 0.85
rt_kprintfFunction · 0.85

Tested by

no test coverage detected