Kernel: Rename assert.h to ensure.h

The macro is named "ensure", the header file should reflect that.
This commit is contained in:
apio 2022-11-09 15:28:35 +01:00
parent da7ad8da5b
commit 1ea216dfd1
15 changed files with 22 additions and 21 deletions

View File

@ -1,8 +0,0 @@
#pragma once
#include "panic/Panic.h"
#define STRINGIZE(x) #x
#define STRINGIZE_VALUE_OF(x) STRINGIZE(x)
#define ensure(expr) \
(bool)(expr) || panic("Check failed at " __FILE__ ", line " STRINGIZE_VALUE_OF(__LINE__) ": " #expr)

View File

@ -0,0 +1,9 @@
#pragma once
#include "panic/Panic.h"
#define STRINGIZE(x) #x
#define STRINGIZE_VALUE_OF(x) STRINGIZE(x)
// clang-format off
#define ensure(expr) (bool)(expr) || panic("Check failed at " __FILE__ ", line " STRINGIZE_VALUE_OF(__LINE__) ": " #expr)
// clang-format on

View File

@ -3,7 +3,7 @@
#include "gdt/GDT.h"
#include "log/Log.h"
#include "memory/MemoryManager.h"
#include "std/assert.h"
#include "std/ensure.h"
#include "std/string.h"
#include <stdint.h>

View File

@ -16,7 +16,7 @@
#include "rand/Mersenne.h"
#include "render/Framebuffer.h"
#include "render/TextRenderer.h"
#include "std/assert.h"
#include "std/ensure.h"
#include "std/string.h"
#include "utils/Time.h"

View File

@ -8,7 +8,7 @@
#include "memory/VMM.h"
#include "misc/hang.h"
#include "panic/Panic.h"
#include "std/assert.h"
#include "std/ensure.h"
#include "std/stdio.h"
#include "sys/Syscall.h"
#include "thread/Scheduler.h"

View File

@ -2,7 +2,7 @@
#include "interrupts/IDT.h"
#include "log/Log.h"
#include "std/assert.h"
#include "std/ensure.h"
struct IDTEntry
{

View File

@ -13,7 +13,7 @@
#include "memory/Memory.h"
#include "memory/MemoryMap.h"
#include "misc/hang.h"
#include "std/assert.h"
#include "std/ensure.h"
#include "std/stdlib.h"
#include "thread/PIT.h"
#include "thread/Scheduler.h"

View File

@ -8,7 +8,7 @@
#include "memory/PMM.h"
#include "memory/VMM.h"
#include "misc/utils.h"
#include "std/assert.h"
#include "std/ensure.h"
void MemoryManager::init()
{

View File

@ -6,7 +6,7 @@
#include "memory/Memory.h"
#include "memory/MemoryManager.h"
#include "misc/utils.h"
#include "std/assert.h"
#include "std/ensure.h"
#include "std/string.h"
extern BOOTBOOT bootboot;

View File

@ -4,7 +4,7 @@
#include "log/Log.h"
#include "memory/PMM.h"
#include "misc/utils.h"
#include "std/assert.h"
#include "std/ensure.h"
#include "std/string.h"
#include "utils/Addresses.h"
#include "utils/Registers.h"

View File

@ -1,7 +1,7 @@
#define MODULE "rand"
#include "rand/Mersenne.h"
#include "std/assert.h"
#include "std/ensure.h"
#include <stddef.h>
typedef uint64_t word_t;

View File

@ -8,7 +8,7 @@
#include "memory/MemoryManager.h"
#include "memory/VMM.h"
#include "misc/utils.h"
#include "std/assert.h"
#include "std/ensure.h"
#include "std/errno.h"
#include "std/stdlib.h"
#include "std/string.h"

View File

@ -6,7 +6,7 @@
#include "memory/MemoryManager.h"
#include "memory/PMM.h"
#include "memory/VMM.h"
#include "std/assert.h"
#include "std/ensure.h"
#include "std/errno.h"
#include "std/stdlib.h"
#include "std/string.h"

View File

@ -10,7 +10,7 @@
#include "misc/reboot.h"
#include "misc/utils.h"
#include "panic/Panic.h"
#include "std/assert.h"
#include "std/ensure.h"
#include "std/errno.h"
#include "std/stdlib.h"
#include "std/string.h"

View File

@ -3,7 +3,7 @@
#include "thread/Task.h"
#include "log/Log.h"
#include "memory/VMM.h"
#include "std/assert.h"
#include "std/ensure.h"
#include "std/errno.h"
#include "std/string.h"