Now that exit is __dead2, we need to tag ub_exit() as __dead2. To do

that, we have to put a while (1); after the syscall that will never
return to fake out the compiler....
This commit is contained in:
Warner Losh 2018-01-26 21:50:59 +00:00
parent 074cc5f66d
commit 39bdddcd8c
2 changed files with 2 additions and 1 deletions

View File

@ -187,6 +187,7 @@ ub_reset(void)
{
syscall(API_RESET, NULL);
while (1); /* Can't tag syscall as __dead2 */
}
static struct mem_region mr[UB_MAX_MR];

View File

@ -78,7 +78,7 @@ void ub_putc(char);
void ub_puts(const char *);
/* system */
void ub_reset(void);
void ub_reset(void) __dead2;
struct sys_info *ub_get_sys_info(void);
/* time */