mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-07-11 07:19:20 +00:00
Renamed "__no_instrument_function"
This commit is contained in:
@ -8,13 +8,13 @@ NewLock(DebuggerLock);
|
||||
|
||||
using namespace UniversalAsynchronousReceiverTransmitter;
|
||||
|
||||
static inline __no_instrument_function void uart_wrapper(char c, void *unused)
|
||||
static inline NIF void uart_wrapper(char c, void *unused)
|
||||
{
|
||||
UART(COM1).Write(c);
|
||||
UNUSED(unused);
|
||||
}
|
||||
|
||||
static inline __no_instrument_function void WritePrefix(DebugLevel Level, const char *File, int Line, const char *Function)
|
||||
static inline NIF void WritePrefix(DebugLevel Level, const char *File, int Line, const char *Function)
|
||||
{
|
||||
const char *DbgLvlString;
|
||||
switch (Level)
|
||||
@ -52,7 +52,7 @@ static inline __no_instrument_function void WritePrefix(DebugLevel Level, const
|
||||
|
||||
namespace SysDbg
|
||||
{
|
||||
__no_instrument_function 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, ...)
|
||||
{
|
||||
WritePrefix(Level, File, Line, Function);
|
||||
va_list args;
|
||||
@ -61,7 +61,7 @@ namespace SysDbg
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
__no_instrument_function 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, ...)
|
||||
{
|
||||
WritePrefix(Level, File, Line, Function);
|
||||
va_list args;
|
||||
@ -71,7 +71,7 @@ namespace SysDbg
|
||||
uart_wrapper('\n', nullptr);
|
||||
}
|
||||
|
||||
__no_instrument_function 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);
|
||||
WritePrefix(Level, File, Line, Function);
|
||||
@ -81,7 +81,7 @@ namespace SysDbg
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
__no_instrument_function 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);
|
||||
WritePrefix(Level, File, Line, Function);
|
||||
@ -94,7 +94,7 @@ namespace SysDbg
|
||||
}
|
||||
|
||||
// C compatibility
|
||||
extern "C" __no_instrument_function 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, ...)
|
||||
{
|
||||
WritePrefix(Level, File, Line, Function);
|
||||
va_list args;
|
||||
@ -104,7 +104,7 @@ extern "C" __no_instrument_function void SysDbgWrite(enum DebugLevel Level, cons
|
||||
}
|
||||
|
||||
// C compatibility
|
||||
extern "C" __no_instrument_function 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, ...)
|
||||
{
|
||||
WritePrefix(Level, File, Line, Function);
|
||||
va_list args;
|
||||
@ -115,7 +115,7 @@ extern "C" __no_instrument_function void SysDbgWriteLine(enum DebugLevel Level,
|
||||
}
|
||||
|
||||
// C compatibility
|
||||
extern "C" __no_instrument_function 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);
|
||||
WritePrefix(Level, File, Line, Function);
|
||||
@ -126,7 +126,7 @@ extern "C" __no_instrument_function void SysDbgLockedWrite(enum DebugLevel Level
|
||||
}
|
||||
|
||||
// C compatibility
|
||||
extern "C" __no_instrument_function 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);
|
||||
WritePrefix(Level, File, Line, Function);
|
||||
|
@ -35,7 +35,7 @@ static MemoryAllocatorType AllocatorType = MemoryAllocatorType::None;
|
||||
Xalloc::V1 *XallocV1Allocator = nullptr;
|
||||
|
||||
#ifdef DEBUG
|
||||
__no_instrument_function void tracepagetable(PageTable4 *pt)
|
||||
NIF void tracepagetable(PageTable4 *pt)
|
||||
{
|
||||
for (int i = 0; i < 512; i++)
|
||||
{
|
||||
@ -54,7 +54,7 @@ __no_instrument_function void tracepagetable(PageTable4 *pt)
|
||||
}
|
||||
#endif
|
||||
|
||||
__no_instrument_function void MapFromZero(PageTable4 *PT, BootInfo *Info)
|
||||
NIF void MapFromZero(PageTable4 *PT, BootInfo *Info)
|
||||
{
|
||||
static int once = 0;
|
||||
if (!once++)
|
||||
@ -79,7 +79,7 @@ __no_instrument_function void MapFromZero(PageTable4 *PT, BootInfo *Info)
|
||||
}
|
||||
}
|
||||
|
||||
__no_instrument_function void MapFramebuffer(PageTable4 *PT, BootInfo *Info)
|
||||
NIF void MapFramebuffer(PageTable4 *PT, BootInfo *Info)
|
||||
{
|
||||
Virtual va = Virtual(PT);
|
||||
int itrfb = 0;
|
||||
@ -96,7 +96,7 @@ __no_instrument_function void MapFramebuffer(PageTable4 *PT, BootInfo *Info)
|
||||
}
|
||||
}
|
||||
|
||||
__no_instrument_function void MapKernel(PageTable4 *PT, BootInfo *Info)
|
||||
NIF void MapKernel(PageTable4 *PT, BootInfo *Info)
|
||||
{
|
||||
/* KernelStart KernelTextEnd KernelRoDataEnd KernelEnd
|
||||
Kernel Start & Text Start ------ Text End ------ Kernel Rodata End ------ Kernel Data End & Kernel End
|
||||
@ -143,7 +143,7 @@ __no_instrument_function void MapKernel(PageTable4 *PT, BootInfo *Info)
|
||||
KernelStart, KernelTextEnd, KernelRoDataEnd, KernelEnd, Info->Kernel.PhysicalBase, BaseKernelMapAddress - PAGE_SIZE);
|
||||
}
|
||||
|
||||
__no_instrument_function void InitializeMemoryManagement(BootInfo *Info)
|
||||
NIF void InitializeMemoryManagement(BootInfo *Info)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
for (uint64_t i = 0; i < Info->Memory.Entries; i++)
|
||||
@ -190,7 +190,6 @@ __no_instrument_function void InitializeMemoryManagement(BootInfo *Info)
|
||||
Type);
|
||||
}
|
||||
#endif
|
||||
|
||||
trace("Initializing Physical Memory Manager");
|
||||
// KernelAllocator = Physical(); <- Already called in the constructor
|
||||
KernelAllocator.Init(Info);
|
||||
|
@ -92,7 +92,7 @@ namespace SymbolResolver
|
||||
|
||||
Symbols::~Symbols() {}
|
||||
|
||||
const __no_instrument_function char *Symbols::GetSymbolFromAddress(uintptr_t Address)
|
||||
const NIF char *Symbols::GetSymbolFromAddress(uintptr_t Address)
|
||||
{
|
||||
Symbols::SymbolTable Result{0, (char *)"<unknown>"};
|
||||
for (uintptr_t i = 0; i < this->TotalEntries; i++)
|
||||
@ -101,7 +101,7 @@ namespace SymbolResolver
|
||||
return Result.FunctionName;
|
||||
}
|
||||
|
||||
__no_instrument_function void Symbols::AddSymbol(uintptr_t Address, const char *Name)
|
||||
NIF void Symbols::AddSymbol(uintptr_t Address, const char *Name)
|
||||
{
|
||||
if (this->TotalEntries >= 0x10000)
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ volatile bool serialports[8] = {false, false, false, false, false, false, false,
|
||||
Vector<UniversalAsynchronousReceiverTransmitter::Events *> RegisteredEvents;
|
||||
|
||||
#if defined(__amd64__) || defined(__i386__)
|
||||
__no_instrument_function uint8_t NoProfiler_inportb(uint16_t Port)
|
||||
NIF uint8_t NoProfiler_inportb(uint16_t Port)
|
||||
{
|
||||
uint8_t Result;
|
||||
asm("in %%dx, %%al"
|
||||
@ -16,7 +16,7 @@ __no_instrument_function uint8_t NoProfiler_inportb(uint16_t Port)
|
||||
return Result;
|
||||
}
|
||||
|
||||
__no_instrument_function void NoProfiler_outportb(uint16_t Port, uint8_t Data)
|
||||
NIF void NoProfiler_outportb(uint16_t Port, uint8_t Data)
|
||||
{
|
||||
asmv("out %%al, %%dx"
|
||||
:
|
||||
@ -37,7 +37,7 @@ namespace UniversalAsynchronousReceiverTransmitter
|
||||
|
||||
/* TODO: Serial Port implementation needs reword. https://wiki.osdev.org/Serial_Ports */
|
||||
|
||||
SafeFunction __no_instrument_function UART::UART(SerialPorts Port)
|
||||
SafeFunction NIF UART::UART(SerialPorts Port)
|
||||
{
|
||||
#if defined(__amd64__) || defined(__i386__)
|
||||
if (Port == COMNULL)
|
||||
@ -104,9 +104,9 @@ namespace UniversalAsynchronousReceiverTransmitter
|
||||
#endif
|
||||
}
|
||||
|
||||
SafeFunction __no_instrument_function UART::~UART() {}
|
||||
SafeFunction NIF UART::~UART() {}
|
||||
|
||||
SafeFunction __no_instrument_function void UART::Write(uint8_t Char)
|
||||
SafeFunction NIF void UART::Write(uint8_t Char)
|
||||
{
|
||||
#if defined(__amd64__) || defined(__i386__)
|
||||
while ((NoProfiler_inportb(Port + 5) & SERIAL_BUFFER_EMPTY) == 0)
|
||||
@ -118,7 +118,7 @@ namespace UniversalAsynchronousReceiverTransmitter
|
||||
e->OnSent(Char);
|
||||
}
|
||||
|
||||
SafeFunction __no_instrument_function uint8_t UART::Read()
|
||||
SafeFunction NIF uint8_t UART::Read()
|
||||
{
|
||||
#if defined(__amd64__) || defined(__i386__)
|
||||
while ((NoProfiler_inportb(Port + 5) & 1) == 0)
|
||||
@ -136,13 +136,13 @@ namespace UniversalAsynchronousReceiverTransmitter
|
||||
}
|
||||
}
|
||||
|
||||
SafeFunction __no_instrument_function Events::Events(SerialPorts Port)
|
||||
SafeFunction NIF Events::Events(SerialPorts Port)
|
||||
{
|
||||
this->Port = Port;
|
||||
RegisteredEvents.push_back(this);
|
||||
}
|
||||
|
||||
SafeFunction __no_instrument_function Events::~Events()
|
||||
SafeFunction NIF Events::~Events()
|
||||
{
|
||||
for (uintptr_t i = 0; i < RegisteredEvents.size(); i++)
|
||||
if (RegisteredEvents[i] == this)
|
||||
|
Reference in New Issue
Block a user