summaryrefslogtreecommitdiffhomepage
path: root/Private/KernelKit/SMPManager.hpp
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlalelmahrouss@icloud.com>2024-02-05 11:12:42 +0100
committerAmlal El Mahrouss <amlalelmahrouss@icloud.com>2024-02-05 11:12:42 +0100
commit81144dd05a7c01701c3bf7b04e345dccfef2bf82 (patch)
tree163bd79816e97ca31484df86c008af3f9a803ffd /Private/KernelKit/SMPManager.hpp
parentf8c9b81ff120160af60af6e9d44cba338aceb65a (diff)
HCR-11:
Kernel: Improvements and more. Bootloader: Now works on real hardware (previous commit.) Signed-off-by: Amlal El Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'Private/KernelKit/SMPManager.hpp')
-rw-r--r--Private/KernelKit/SMPManager.hpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/Private/KernelKit/SMPManager.hpp b/Private/KernelKit/SMPManager.hpp
index 0a71a165..8cbe3259 100644
--- a/Private/KernelKit/SMPManager.hpp
+++ b/Private/KernelKit/SMPManager.hpp
@@ -14,6 +14,8 @@
#include <CompilerKit/CompilerKit.hpp>
#include <NewKit/Ref.hpp>
+#include "NewKit/Defines.hpp"
+
#define kMaxHarts 8
namespace HCore {
@@ -25,6 +27,8 @@ enum ThreadKind {
kFallback, // fallback thread, cannot be used by user if not clear or used by
// kernel.
kBoot, // The core we booted from, the mama.
+ kInvalidThread,
+ kThreadCount,
};
///
@@ -100,7 +104,9 @@ class SMPManager final {
private:
Array<HardwareThread, kMaxHarts> m_ThreadList;
- ThreadID m_CurrentThread;
+ ThreadID m_CurrentThread{0};
+ SizeT m_UsedThreads{0};
+ SizeT m_MaxThreads{0};
};
// @brief wakes up thread.