main: add global kernel ready bool

Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
Michael Shaw 2026-07-14 23:35:13 -04:00
commit 5692aa8120
2 changed files with 5 additions and 0 deletions

View file

@ -34,4 +34,6 @@
void yield();
void _panic();
extern bool kernel_init_ready;
#endif /* _COMMON_H_ */

View file

@ -39,6 +39,8 @@ typedef void (*initcall_t)(void);
extern initcall_t __initcall_start, __initcall_end;
struct tty *tty_printf = NULL;
bool kernel_init_ready = false;
static void do_initcalls()
{
for (initcall_t *fn = &__initcall_start; fn < &__initcall_end; fn++)
@ -79,6 +81,7 @@ static void kmain()
do_initcalls();
/* do nothing, for now :) */
kernel_init_ready = true;
yield();
}