1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

core/init: set _native_retval to retval of main()

This commit is contained in:
Benjamin Valentin 2024-03-04 14:41:20 +01:00
parent a613ff5831
commit deaa17cc27

View File

@ -74,6 +74,17 @@ static void *main_trampoline(void *arg)
}
#endif
#ifdef CPU_NATIVE
extern unsigned _native_retval;
if (!_native_retval) {
_native_retval = res;
}
#endif
if (IS_ACTIVE(CONFIG_CORE_EXIT_WITH_MAIN)) {
pm_off();
}
return NULL;
}