Skip to content

Commit c308f80

Browse files
pabigotnashif
authored andcommitted
kernel: init: move C++ initialization before application init loop
C++ is documented to be supported in applications, so it should be supported in SYS_INIT() functions run at the application init level. Signed-off-by: Peter Bigot <[email protected]>
1 parent df56ce3 commit c308f80

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

kernel/init.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,6 @@ static void bg_thread_main(void *unused1, void *unused2, void *unused3)
233233
#endif
234234
#endif
235235

236-
/* Final init level before app starts */
237-
z_sys_init_run_level(_SYS_INIT_LEVEL_APPLICATION);
238-
239236
#ifdef CONFIG_CPLUSPLUS
240237
/* Process the .ctors and .init_array sections */
241238
extern void __do_global_ctors_aux(void);
@@ -244,6 +241,9 @@ static void bg_thread_main(void *unused1, void *unused2, void *unused3)
244241
__do_init_array_aux();
245242
#endif
246243

244+
/* Final init level before app starts */
245+
z_sys_init_run_level(_SYS_INIT_LEVEL_APPLICATION);
246+
247247
z_init_static_threads();
248248

249249
#ifdef CONFIG_SMP

0 commit comments

Comments
 (0)