vulcanos/kernel/libc/assert.h

22 lines
697 B
C
Raw Normal View History

2019-09-19 12:04:12 +02:00
/**************************************
2021-01-02 17:49:15 +01:00
* VulcanOS Kernel *
2019-09-19 12:04:12 +02:00
* Developed by Marco 'icebit' Cetica *
2021-01-02 17:49:15 +01:00
* (c) 2019-2021 *
2019-09-19 12:04:12 +02:00
* Released under GPLv3 *
* https://github.com/ice-bit/iceOS *
***************************************/
#ifndef ASSERT_H
#define ASSERT_H
#include <stdint.h>
#include "../drivers/tty.h"
// These functions are used for error checking
#define PANIC(msg) panic(msg, __FILE__, __LINE__);
#define ASSERT(b) ((b) ? (void)0 : panic_assert(__FILE__, __LINE__, #b))
extern void panic(const char *message, const char *file, uint32_t line);
extern void panic_assert(const char *file, uint32_t line, const char *desc);
2021-01-02 17:49:15 +01:00
#endif