Remove ELFSymbolTable from PCB

This commit is contained in:
EnderIce2
2024-02-28 06:11:31 +02:00
parent e74c5f7bab
commit ddad5ca38a
8 changed files with 13 additions and 92 deletions

View File

@ -127,7 +127,7 @@ namespace Tasking
}
PCB::PCB(Task *ctx, PCB *Parent, const char *Name,
TaskExecutionMode ExecutionMode, void *Image,
TaskExecutionMode ExecutionMode,
bool UseKernelPageTable,
uint16_t UserID, uint16_t GroupID)
: Node(ProcFS, std::to_string(ctx->NextPID), NodeType::DIRECTORY)
@ -208,9 +208,6 @@ namespace Tasking
this->ProgramBreak = new Memory::ProgramBreak(this->PageTable, this->vma);
this->Signals = new Signal(this);
if (Image)
this->ELFSymbolTable = new SymbolResolver::Symbols((uintptr_t)Image);
debug("Process page table: %#lx", this->PageTable);
debug("Created %s process \"%s\"(%d). Parent \"%s\"(%d)",
ExecutionMode == TaskExecutionMode::User ? "user" : "kernel",
@ -247,10 +244,6 @@ namespace Tasking
ctx->ProcessList.end(),
this));
debug("Freeing symbol table strings");
if (this->ELFSymbolTable)
delete this->ELFSymbolTable;
debug("Freeing signals");
delete this->Signals;

View File

@ -313,15 +313,12 @@ namespace Tasking
PCB *Task::CreateProcess(PCB *Parent,
const char *Name,
TaskExecutionMode ExecutionMode,
void *Image,
bool UseKernelPageTable,
uint16_t UserID,
uint16_t GroupID)
uint16_t UserID, uint16_t GroupID)
{
SmartLock(TaskingLock);
return new PCB(this, Parent, Name, ExecutionMode,
Image, UseKernelPageTable,
UserID, GroupID);
UseKernelPageTable, UserID, GroupID);
}
void Task::StartScheduler()
@ -383,10 +380,8 @@ namespace Tasking
#endif
KernelProcess = CreateProcess(nullptr, "Kernel",
TaskExecutionMode::Kernel,
nullptr, true);
TaskExecutionMode::Kernel, true);
KernelProcess->PageTable = KernelPageTable;
KernelProcess->ELFSymbolTable = KernelSymbolTable;
TCB *kthrd = CreateThread(KernelProcess, EntryPoint,
nullptr, nullptr,
std::vector<AuxiliaryVector>(), Arch);
@ -418,9 +413,7 @@ namespace Tasking
}
IdleProcess = CreateProcess(nullptr, (char *)"Idle",
TaskExecutionMode::Kernel,
nullptr, true);
IdleProcess->ELFSymbolTable = KernelSymbolTable;
TaskExecutionMode::Kernel, true);
for (int i = 0; i < SMP::CPUCores; i++)
{
TCB *thd = CreateThread(IdleProcess, IP(IdleProcessLoop));