From 98e15f73f090c32b5197ecec0845c408d4a54608 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Wed, 2 Jun 2021 22:27:59 +0200 Subject: Huge scheduler rewrite and other things --- libs/libc/inc/assert.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'libs/libc/inc') diff --git a/libs/libc/inc/assert.h b/libs/libc/inc/assert.h index 6b35dd3..178a733 100644 --- a/libs/libc/inc/assert.h +++ b/libs/libc/inc/assert.h @@ -12,7 +12,8 @@ if (!(exp)) { \ printf("%s:%d: %s: Kernel assertion '%s' failed\n", __FILE__, __LINE__, \ __func__, #exp); \ - __asm__ volatile("cli\nhlt"); \ + while (1) \ + __asm__ volatile("cli\nhlt"); \ } \ } #elif defined(USER) @@ -25,4 +26,7 @@ } #endif +#define assert_not_reached() \ + panic("%s:%d: %s: Reached code that should not be reached\n", __FILE__, __LINE__, __func__) + #endif -- cgit v1.2.3