mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-06-01 17:27:59 +00:00
Replace SmartCriticalSection with SmartLock
This commit is contained in:
parent
115557a551
commit
ac0c9505f3
@ -264,7 +264,7 @@ namespace Tasking
|
||||
|
||||
void Task::Sleep(uint64_t Milliseconds)
|
||||
{
|
||||
SmartCriticalSection(TaskingLock);
|
||||
SmartLock(TaskingLock);
|
||||
TCB *thread = this->GetCurrentThread();
|
||||
thread->Status = TaskStatus::Sleeping;
|
||||
if (thread->Parent->Threads.size() == 1)
|
||||
@ -341,7 +341,7 @@ namespace Tasking
|
||||
TaskArchitecture Architecture,
|
||||
TaskCompatibility Compatibility)
|
||||
{
|
||||
SmartCriticalSection(TaskingLock);
|
||||
SmartLock(TaskingLock);
|
||||
TCB *Thread = new TCB;
|
||||
if (Parent == nullptr)
|
||||
{
|
||||
@ -641,7 +641,7 @@ namespace Tasking
|
||||
TaskTrustLevel TrustLevel, void *Image,
|
||||
bool DoNotCreatePageTable)
|
||||
{
|
||||
SmartCriticalSection(TaskingLock);
|
||||
SmartLock(TaskingLock);
|
||||
PCB *Process = new PCB;
|
||||
Process->ID = this->NextPID++;
|
||||
strcpy(Process->Name, Name);
|
||||
@ -739,7 +739,7 @@ namespace Tasking
|
||||
|
||||
Task::Task(const IP EntryPoint) : Interrupts::Handler(CPU::x86::IRQ16)
|
||||
{
|
||||
SmartCriticalSection(TaskingLock);
|
||||
SmartLock(TaskingLock);
|
||||
#if defined(a64)
|
||||
// Map the IRQ16 to the first CPU.
|
||||
((APIC::APIC *)Interrupts::apic[0])->RedirectIRQ(0, CPU::x86::IRQ16 - CPU::x86::IRQ0, 1);
|
||||
@ -837,7 +837,7 @@ namespace Tasking
|
||||
Task::~Task()
|
||||
{
|
||||
debug("Destructor called");
|
||||
SmartCriticalSection(TaskingLock);
|
||||
SmartLock(TaskingLock);
|
||||
trace("Stopping tasking");
|
||||
foreach (PCB *Process in ListProcess)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user