baremetal: get exit status working with on_exit :-)

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-05-08 00:00:01 +00:00
parent 18ca0b3c9c
commit 406ee82cf3
16 changed files with 79 additions and 34 deletions

9
lkmc.c
View File

@@ -12,11 +12,16 @@ void lkmc_assert(bool condition) {
}
void lkmc_assert_fail(void) {
printf("%s\n", __func__);
puts("lkmc_exit_status_1");
exit(1);
}
void lkmc_baremetal_on_exit_callback(int status, void *arg) {
(void)arg;
if (status != 0) {
printf("lkmc_exit_status_%d\n", status);
}
}
#if defined(__aarch64__)
#define LKMC_SYSREG_READ_WRITE(type, name) \
type LKMC_CONCAT(LKMC_CONCAT(LKMC_SYSREG_SYMBOL_PREFIX, name), _read(void)) { \