mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-07-01 18:39:16 +00:00
refactor(kernel): change NIF to nif
This commit is contained in:
@ -27,12 +27,12 @@ NewLock(DebuggerLock);
|
||||
|
||||
extern bool serialports[8];
|
||||
|
||||
EXTERNC NIF void uart_wrapper(char c, void *)
|
||||
EXTERNC nif void uart_wrapper(char c, void *)
|
||||
{
|
||||
uart.DebugWrite(c);
|
||||
}
|
||||
|
||||
static inline NIF bool WritePrefix(DebugLevel Level, const char *File, int Line, const char *Function, const char *Format, va_list args)
|
||||
static inline nif bool WritePrefix(DebugLevel Level, const char *File, int Line, const char *Function, const char *Format, va_list args)
|
||||
{
|
||||
const char *DbgLvlString;
|
||||
switch (Level)
|
||||
@ -79,7 +79,7 @@ static inline NIF bool WritePrefix(DebugLevel Level, const char *File, int Line,
|
||||
|
||||
namespace SysDbg
|
||||
{
|
||||
NIF void Write(DebugLevel Level, const char *File, int Line, const char *Function, const char *Format, ...)
|
||||
nif void Write(DebugLevel Level, const char *File, int Line, const char *Function, const char *Format, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, Format);
|
||||
@ -92,7 +92,7 @@ namespace SysDbg
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
NIF void WriteLine(DebugLevel Level, const char *File, int Line, const char *Function, const char *Format, ...)
|
||||
nif void WriteLine(DebugLevel Level, const char *File, int Line, const char *Function, const char *Format, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, Format);
|
||||
@ -106,7 +106,7 @@ namespace SysDbg
|
||||
uart_wrapper('\n', nullptr);
|
||||
}
|
||||
|
||||
NIF void LockedWrite(DebugLevel Level, const char *File, int Line, const char *Function, const char *Format, ...)
|
||||
nif void LockedWrite(DebugLevel Level, const char *File, int Line, const char *Function, const char *Format, ...)
|
||||
{
|
||||
SmartTimeoutLock(DebuggerLock, 1000);
|
||||
va_list args;
|
||||
@ -120,7 +120,7 @@ namespace SysDbg
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
NIF void LockedWriteLine(DebugLevel Level, const char *File, int Line, const char *Function, const char *Format, ...)
|
||||
nif void LockedWriteLine(DebugLevel Level, const char *File, int Line, const char *Function, const char *Format, ...)
|
||||
{
|
||||
SmartTimeoutLock(DebuggerLock, 1000);
|
||||
va_list args;
|
||||
@ -137,7 +137,7 @@ namespace SysDbg
|
||||
}
|
||||
|
||||
// C compatibility
|
||||
extern "C" NIF void SysDbgWrite(enum DebugLevel Level, const char *File, int Line, const char *Function, const char *Format, ...)
|
||||
extern "C" nif void SysDbgWrite(enum DebugLevel Level, const char *File, int Line, const char *Function, const char *Format, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, Format);
|
||||
@ -151,7 +151,7 @@ extern "C" NIF void SysDbgWrite(enum DebugLevel Level, const char *File, int Lin
|
||||
}
|
||||
|
||||
// C compatibility
|
||||
extern "C" NIF void SysDbgWriteLine(enum DebugLevel Level, const char *File, int Line, const char *Function, const char *Format, ...)
|
||||
extern "C" nif void SysDbgWriteLine(enum DebugLevel Level, const char *File, int Line, const char *Function, const char *Format, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, Format);
|
||||
@ -166,7 +166,7 @@ extern "C" NIF void SysDbgWriteLine(enum DebugLevel Level, const char *File, int
|
||||
}
|
||||
|
||||
// C compatibility
|
||||
extern "C" NIF void SysDbgLockedWrite(enum DebugLevel Level, const char *File, int Line, const char *Function, const char *Format, ...)
|
||||
extern "C" nif void SysDbgLockedWrite(enum DebugLevel Level, const char *File, int Line, const char *Function, const char *Format, ...)
|
||||
{
|
||||
SmartTimeoutLock(DebuggerLock, 1000);
|
||||
va_list args;
|
||||
@ -181,7 +181,7 @@ extern "C" NIF void SysDbgLockedWrite(enum DebugLevel Level, const char *File, i
|
||||
}
|
||||
|
||||
// C compatibility
|
||||
extern "C" NIF void SysDbgLockedWriteLine(enum DebugLevel Level, const char *File, int Line, const char *Function, const char *Format, ...)
|
||||
extern "C" nif void SysDbgLockedWriteLine(enum DebugLevel Level, const char *File, int Line, const char *Function, const char *Format, ...)
|
||||
{
|
||||
SmartTimeoutLock(DebuggerLock, 1000);
|
||||
va_list args;
|
||||
|
@ -52,7 +52,7 @@ Xalloc::V1 *XallocV1Allocator = nullptr;
|
||||
Xalloc::V2 *XallocV2Allocator = nullptr;
|
||||
|
||||
#ifdef DEBUG
|
||||
NIF void tracepagetable(PageTable *pt)
|
||||
nif void tracepagetable(PageTable *pt)
|
||||
{
|
||||
for (int i = 0; i < 512; i++)
|
||||
{
|
||||
@ -71,7 +71,7 @@ NIF void tracepagetable(PageTable *pt)
|
||||
}
|
||||
#endif
|
||||
|
||||
NIF void MapEntries(PageTable *PT)
|
||||
nif void MapEntries(PageTable *PT)
|
||||
{
|
||||
debug("mapping %d memory entries", bInfo.Memory.Entries);
|
||||
Virtual vmm = Virtual(PT);
|
||||
@ -89,7 +89,7 @@ NIF void MapEntries(PageTable *PT)
|
||||
vmm.Unmap((void *)0);
|
||||
}
|
||||
|
||||
NIF void MapFramebuffer(PageTable *PT)
|
||||
nif void MapFramebuffer(PageTable *PT)
|
||||
{
|
||||
debug("Mapping Framebuffer");
|
||||
Virtual vmm = Virtual(PT);
|
||||
@ -123,7 +123,7 @@ NIF void MapFramebuffer(PageTable *PT)
|
||||
}
|
||||
}
|
||||
|
||||
NIF void MapKernel(PageTable *PT)
|
||||
nif void MapKernel(PageTable *PT)
|
||||
{
|
||||
debug("Mapping Kernel");
|
||||
|
||||
@ -237,7 +237,7 @@ NIF void MapKernel(PageTable *PT)
|
||||
info("Cannot determine kernel file address. Ignoring.");
|
||||
}
|
||||
|
||||
NIF void CreatePageTable(PageTable *pt)
|
||||
nif void CreatePageTable(PageTable *pt)
|
||||
{
|
||||
static int check_cpuid = 0;
|
||||
|
||||
@ -286,7 +286,7 @@ NIF void CreatePageTable(PageTable *pt)
|
||||
#endif
|
||||
}
|
||||
|
||||
NIF void InitializeMemoryManagement()
|
||||
nif void InitializeMemoryManagement()
|
||||
{
|
||||
#ifdef DEBUG
|
||||
#ifndef __i386__
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
namespace SymbolResolver
|
||||
{
|
||||
const NIF char *Symbols::GetSymbol(uintptr_t Address)
|
||||
const nif char *Symbols::GetSymbol(uintptr_t Address)
|
||||
{
|
||||
SymbolTable Result{};
|
||||
|
||||
|
Reference in New Issue
Block a user