summaryrefslogtreecommitdiffhomepage
path: root/Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp
diff options
context:
space:
mode:
authorAmlal EL Mahrouss <amlal@softwarelabs.com>2024-06-15 09:38:25 +0200
committerAmlal EL Mahrouss <amlal@softwarelabs.com>2024-06-15 09:38:25 +0200
commit1efed3cbec879134d55aee8e13c6bbc6da9b6ef6 (patch)
treedcd46a37fb228a0e7456dc5e0861efb0a5423de1 /Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp
parentce11c1a5252f7cbb52ebecff41522f3c4a30525a (diff)
MHR-31: Changes related to ARM64/AMD64:
This is the last commit regarding AMD64 support, focusing on ARM64 now. Signed-off-by: Amlal EL Mahrouss <amlal@softwarelabs.com>
Diffstat (limited to 'Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp')
-rw-r--r--Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp b/Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp
index 37a681ab..26773640 100644
--- a/Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp
+++ b/Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp
@@ -10,6 +10,7 @@
#include <ArchKit/ArchKit.hpp>
#include <KernelKit/Semaphore.hpp>
#include <KernelKit/ProcessScheduler.hxx>
+#include <KernelKit/Timer.hpp>
#define kAPIC_ICR_Low 0x300
#define kAPIC_ICR_High 0x310
@@ -184,11 +185,7 @@ namespace NewOS::HAL
{
Semaphore sem;
- while (sem.IsLocked())
- {
- }
-
- sem.Lock(&ProcessScheduler::The().Leak().GetCurrent().Leak());
+ sem.LockOrWait(&ProcessScheduler::The().Leak().GetCurrent().Leak(), Seconds(5));
cFramePtr = stackFrame;