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 <peter.bigot@nordicsemi.no>
This commit is contained in:
Peter Bigot 2020-05-08 09:28:44 -05:00 committed by Anas Nashif
commit c308f8069f

View file

@ -233,9 +233,6 @@ static void bg_thread_main(void *unused1, void *unused2, void *unused3)
#endif
#endif
/* Final init level before app starts */
z_sys_init_run_level(_SYS_INIT_LEVEL_APPLICATION);
#ifdef CONFIG_CPLUSPLUS
/* Process the .ctors and .init_array sections */
extern void __do_global_ctors_aux(void);
@ -244,6 +241,9 @@ static void bg_thread_main(void *unused1, void *unused2, void *unused3)
__do_init_array_aux();
#endif
/* Final init level before app starts */
z_sys_init_run_level(_SYS_INIT_LEVEL_APPLICATION);
z_init_static_threads();
#ifdef CONFIG_SMP