AK+Kernel: Print TODO when a TODO() is executed

Previously we would just print "ASSERTION FAILED: false", which was
kinda cryptic and also didn't make it clear whether this was a TODO or
an unreachable condition. Now, we actually print "ASSERTION FAILED:
TODO", making it crystal clear.
This commit is contained in:
sin-ack 2021-08-03 20:02:19 +00:00 committed by Andreas Kling
parent e500b39e47
commit bed51d856a
2 changed files with 5 additions and 2 deletions

View file

@ -12,5 +12,6 @@
# include <assert.h>
# define VERIFY assert
# define VERIFY_NOT_REACHED() assert(false)
# define TODO VERIFY_NOT_REACHED
static constexpr bool TODO = false;
# define TODO() VERIFY(TODO)
#endif

View file

@ -25,4 +25,6 @@ extern "C" {
#define VERIFY_INTERRUPTS_DISABLED() VERIFY(!(cpu_flags() & 0x200))
#define VERIFY_INTERRUPTS_ENABLED() VERIFY(cpu_flags() & 0x200)
#define TODO VERIFY_NOT_REACHED
static constexpr bool TODO = false;
#define TODO() VERIFY(TODO)