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

Function rt_application_init

libcpu/sim/win32/startup_msvc.c:260–281  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

258}
259
260void rt_application_init(void)
261{
262 rt_thread_t tid;
263
264#ifdef RT_USING_HEAP
265 tid = rt_thread_create("main", main_thread_entry, RT_NULL,
266 RT_MAIN_THREAD_STACK_SIZE, RT_MAIN_THREAD_PRIORITY, 20);
267 RT_ASSERT(tid != RT_NULL);
268#else
269 rt_err_t result;
270
271 tid = &main_thread;
272 result = rt_thread_init(tid, "main", main_thread_entry, RT_NULL,
273 main_stack, sizeof(main_stack), RT_MAIN_THREAD_PRIORITY, 20);
274 RT_ASSERT(result == RT_EOK);
275
276 /* if not define RT_USING_HEAP, using to eliminate the warning */
277 (void)result;
278#endif
279
280 rt_thread_startup(tid);
281}
282
283int rtthread_startup(void)
284{

Callers 1

rtthread_startupFunction · 0.70

Calls 3

rt_thread_createFunction · 0.85
rt_thread_initFunction · 0.85
rt_thread_startupFunction · 0.85

Tested by

no test coverage detected