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

Function main_thread_entry

src/components.c:181–203  ·  view source on GitHub ↗

* @brief The system main thread. In this thread will call the rt_components_init() * for initialization of RT-Thread Components and call the user's programming * entry main(). * * @param parameter is the arg of the thread. */

Source from the content-addressed store, hash-verified

179 * @param parameter is the arg of the thread.
180 */
181static void main_thread_entry(void *parameter)
182{
183 extern int main(void);
184 RT_UNUSED(parameter);
185
186#ifdef RT_USING_COMPONENTS_INIT
187 /* RT-Thread components initialization */
188 rt_components_init();
189#endif /* RT_USING_COMPONENTS_INIT */
190
191#ifdef RT_USING_SMP
192 rt_hw_secondary_cpu_up();
193#endif /* RT_USING_SMP */
194 /* invoke system main function */
195#ifdef __ARMCC_VERSION
196 {
197 extern int $Super$$main(void);
198 $Super$$main(); /* for ARMCC. */
199 }
200#elif defined(__ICCARM__) || defined(__GNUC__) || defined(__TASKING__) || defined(__TI_COMPILER_VERSION__)
201 main();
202#endif /* __ARMCC_VERSION */
203}
204
205/**
206 * @brief This function will create and start the main thread, but this thread

Callers

nothing calls this directly

Calls 3

rt_components_initFunction · 0.70
rt_hw_secondary_cpu_upFunction · 0.50
mainFunction · 0.50

Tested by

no test coverage detected