mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-23 09:46:04 -05:00
8 lines
363 B
C
8 lines
363 B
C
#pragma once
|
|
|
|
#include "VGA.h"
|
|
|
|
#define CRASH() do { asm volatile("cli;hlt"); } while(0)
|
|
#define ASSERT(x) do { if (!(x)) { vga_set_attr(0x4f); kprintf("ASSERTION FAILED: " #x "\n%s:%u in %s\n", __FILE__, __LINE__, __PRETTY_FUNCTION__); CRASH(); } } while(0)
|
|
#define RELEASE_ASSERT(x) do { if (!(x)) CRASH(); } while(0)
|
|
#define ASSERT_NOT_REACHED() ASSERT(false)
|