17 lines
620 B
C
17 lines
620 B
C
// This file is part of noxos and licensed under the MIT open source license
|
|
|
|
#ifndef NOX_CORE_H
|
|
#define NOX_CORE_H
|
|
|
|
#include "utils/logger.h"
|
|
#include "platform/interrupts.h"
|
|
|
|
#define CORE_INTERRUPTABLE_HALT_WHILE(a) while(!g_handling_interrupt && a) { asm("hlt"); }
|
|
#define CORE_HALT_WHILE(a) while(!g_handling_interrupt && a) { asm("hlt"); }
|
|
#define CORE_HALT_FOREVER log(LOG_WARNING, "!=====[ HALTING SYSTEM ]=====!"); while(1) { asm("hlt"); }
|
|
|
|
#define CORE_INTERRUPTS_ENABLE asm("sti");
|
|
#define CORE_INTERRUPTS_DISABLE asm("cli");
|
|
|
|
#endif //NOX_CORE_H
|