summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-08-20 21:22:16 +0200
committerAmlal El Mahrouss <amlal@nekernel.org>2025-08-20 21:22:16 +0200
commite5edad799f0f8dbe0b34baf55c30849c941a43f9 (patch)
tree4ba49ec8e0d795e1d5e9a1638870ca4bf691bfa7
parent89b938bcfb5ed69b639f363c91c4054e8d369e76 (diff)
feat: Heavily reworked the SMP subsystem paper.
refactor: BinaryMutex implementation and paper has been reworked as well using LockAndWait instead of LockOrWait. other: Reworked tooling macros. Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
-rw-r--r--dev/kernel/KernelKit/BinaryMutex.h2
-rw-r--r--dev/kernel/src/BinaryMutex.cc2
-rw-r--r--docs/tex/NOTICE.md7
-rw-r--r--docs/tex/binary_mutex.tex2
-rw-r--r--docs/tex/nefs.tex4
-rw-r--r--docs/tex/nekernel_smp_subsystem.tex22
-rw-r--r--tools/fsck.hefs.json8
-rw-r--r--tools/mkfs.hefs.json8
8 files changed, 30 insertions, 25 deletions
diff --git a/dev/kernel/KernelKit/BinaryMutex.h b/dev/kernel/KernelKit/BinaryMutex.h
index f2c15af0..abe8d517 100644
--- a/dev/kernel/KernelKit/BinaryMutex.h
+++ b/dev/kernel/KernelKit/BinaryMutex.h
@@ -28,7 +28,7 @@ class BinaryMutex final {
public:
bool Lock(USER_PROCESS* process);
- bool LockOrWait(USER_PROCESS* process, TimerInterface* timer);
+ bool LockAndWait(USER_PROCESS* process, TimerInterface* timer);
public:
NE_COPY_DEFAULT(BinaryMutex)
diff --git a/dev/kernel/src/BinaryMutex.cc b/dev/kernel/src/BinaryMutex.cc
index 9bfb89d9..3fef477c 100644
--- a/dev/kernel/src/BinaryMutex.cc
+++ b/dev/kernel/src/BinaryMutex.cc
@@ -46,7 +46,7 @@ Bool BinaryMutex::IsLocked() const {
/// @brief Try lock or wait.
/***********************************************************************************/
-Bool BinaryMutex::LockOrWait(USER_PROCESS* process, TimerInterface* timer) {
+Bool BinaryMutex::LockAndWait(USER_PROCESS* process, TimerInterface* timer) {
if (timer == nullptr) return No;
this->Lock(process);
diff --git a/docs/tex/NOTICE.md b/docs/tex/NOTICE.md
index 5d6eb03f..c4015afd 100644
--- a/docs/tex/NOTICE.md
+++ b/docs/tex/NOTICE.md
@@ -1,5 +1,6 @@
-# Notice for LaTeX documents.
+# Notice
-## Recommended Tool
+## Recommended:
-`pdflatex` is recommended for this matter, although you are free to use other tools.
+- `pdflatex` is recommended for this matter.
+- You can use `overleaf` to edit the LaTeX files too. \ No newline at end of file
diff --git a/docs/tex/binary_mutex.tex b/docs/tex/binary_mutex.tex
index 9b8a1c40..1b5a59c2 100644
--- a/docs/tex/binary_mutex.tex
+++ b/docs/tex/binary_mutex.tex
@@ -51,7 +51,7 @@ class BinaryMutex final {
public:
bool Lock(USER_PROCESS* process);
- bool LockOrWait(USER_PROCESS* process, TimerInterface* timer);
+ bool LockAndWait(USER_PROCESS* process, TimerInterface* timer);
public:
NE_COPY_DEFAULT(BinaryMutex)
diff --git a/docs/tex/nefs.tex b/docs/tex/nefs.tex
index 7f2fdd84..37e43d13 100644
--- a/docs/tex/nefs.tex
+++ b/docs/tex/nefs.tex
@@ -21,9 +21,9 @@
showstringspaces=false
}
-\title{NeFS: New Extended File System}
+\title{NeFS: New Extended File System Specification}
\author{Amlal El Mahrouss}
-\date{\today}
+\date{2025}
\begin{document}
diff --git a/docs/tex/nekernel_smp_subsystem.tex b/docs/tex/nekernel_smp_subsystem.tex
index 9a5fe776..cb30f3cb 100644
--- a/docs/tex/nekernel_smp_subsystem.tex
+++ b/docs/tex/nekernel_smp_subsystem.tex
@@ -7,22 +7,26 @@
\begin{document}
-\maketitle
+ \maketitle
-\section{Abstract}
+ \section{Abstract}
-{NeKernel is a hybrid based operating system kernel written in modern C++ (C++17/C++20). It features a bootloader, kernel, tools, libraries, and frameworks. This document is about the SMP subsystem of NeKernel}
+ {NeKernel is a hybrid based operating system kernel written in modern C++ (C++17/C++20). It features a bootloader, kernel, tools, libraries, and frameworks. This document is about the SMP subsystem of the kernel.}
-\section{Design Overview}
+ \section{Design Overview}
-ne\_kernel is designed with SMP by default. Although it may fallback under classic preemptive round-robin scheduling when unavailable - NeKernel runs best on a SMP based machine. The subsystem goes from the HardwareThreadScheduler to the Hardware Abstraction Layer's Application Processors API.
+ {NeKernel is designed with SMP by default. Although it may fallback under classic preemptive round-robin scheduling when unavailable - NeKernel runs best on a SMP based machine. The subsystem goes from the HardwareThreadScheduler to the Hardware Abstraction Layer's Application Processor API.}
-\subsection{HardwareThreadScheduler (HTS)}
+ \section{The SMP Subsystem}
-HardwareThreadScheduler's main purpose is to make cores all busy with a StackFrame. That StackFrame contains program information (instruction, stack pointers) each task is fairly assigned to a core to then be run by the Application Processors API.
+ {The SMP subsystem consist of the HTS (HardwareThreadScheduler) and AP (Application Processor) APIs. Those systems are made to handle SMP tasks inside NeKernel.}
-\subsection{Application Processors (AP)}
+ \subsection{Higher Level: HardwareThreadScheduler (HTS)}
-Application Processors (now referred as AP) is the API taking care of multi-core scheduling, very platform dependent (thus its presence on the HAL) it is designed to run tasks passed from the HardwareThreadScheduler system.
+ {HTS's main purpose is to make cores all busy with a StackFrame object. That object contains program registers such as the stack pointer and instruction pointer. Each task is fairly assigned to then be run by the AP's mp\_register\_task function.}
+
+ \subsection{Lower Level: Application Processor (AP) API}
+
+ {Application Processors (now referred as AP) is the API taking care of multi-core scheduling, very platform dependent (thus its presence on the HAL) it is designed to run tasks passed from the HTS.}
\end{document}
diff --git a/tools/fsck.hefs.json b/tools/fsck.hefs.json
index d6ff4b0f..970665aa 100644
--- a/tools/fsck.hefs.json
+++ b/tools/fsck.hefs.json
@@ -1,5 +1,5 @@
{
- "compiler_path": "g++",
+ "compiler_path": "clang++",
"compiler_std": "c++20",
"headers_path": [
"../"
@@ -9,8 +9,8 @@
],
"output_name": "./dist/fsck.hefs",
"cpp_macros": [
- "kFSCKHEFSVersion=0x0100",
- "kFSCKHEFSVersionHighest=0x0100",
- "kFSCKHEFSVersionLowest=0x0100"
+ "kFsckHeFSVersion=0x0100",
+ "kFsckHeFSVersionHighest=0x0100",
+ "kFsckHeFSVersionLowest=0x0100"
]
} \ No newline at end of file
diff --git a/tools/mkfs.hefs.json b/tools/mkfs.hefs.json
index d29b7f73..542fa473 100644
--- a/tools/mkfs.hefs.json
+++ b/tools/mkfs.hefs.json
@@ -1,5 +1,5 @@
{
- "compiler_path": "g++",
+ "compiler_path": "clang++",
"compiler_std": "c++20",
"headers_path": [
"../"
@@ -9,8 +9,8 @@
],
"output_name": "./dist/mkfs.hefs",
"cpp_macros": [
- "kMKFSHEFSVersion=0x0100",
- "kMKFSHEFSVersionHighest=0x0100",
- "kMKFSHEFSVersionLowest=0x0100"
+ "kMkfsHeFSVersion=0x0100",
+ "kMkfsHeFSVersionHighest=0x0100",
+ "kMkfsHeFSVersionLowest=0x0100"
]
} \ No newline at end of file