/* Overrides of a few newlib C library functions. */ #include void _exit(int status) { if (status) printk("Mini-OS application exited with a status of %d\n", status); do_exit(); } void *sbrk(int inc) { printk("Unsupported function sbrk called in Mini-OS kernel\n"); do_exit(); return NULL; } /* * Expose the replacement for clearing and setting the interrupt flag * as subroutions for use with the C library function longjmp. */ void cli_as_a_subroutine(void) { __cli(); } void sti_as_a_subroutine(void) { __sti(); }