Changed a lot of files. Summary: profiler support; "SafeFunction"; UnlockDeadLock kernel config; Code optimization & more

This commit is contained in:
Alex
2022-11-28 08:25:37 +02:00
parent 2fba834d41
commit 0289054900
62 changed files with 1462 additions and 558 deletions

19
Profiling/gprof.cpp Normal file
View File

@ -0,0 +1,19 @@
#include <types.h>
#include <printf.h>
#include <uart.hpp>
#include "../kernel.h"
using namespace UniversalAsynchronousReceiverTransmitter;
static inline SafeFunction __no_instrument_function void gprof_uart_wrapper(char c, void *unused)
{
UART(COM2).Write(c);
(void)unused;
}
EXTERNC SafeFunction __no_instrument_function void mcount(unsigned long frompc, unsigned long selfpc)
{
// TODO: Implement
/* https://docs.kernel.org/trace/ftrace-design.html */
}