summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2026-01-23 19:55:05 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2026-01-23 19:55:05 +0100
commit187cf4d1af81ba45af85dfe4443574c6e0e0f98a (patch)
treef8cbbddf713ad2073e0efdb3e19006f22b18cd51 /src
parent3a4cb9bfcf9e91f3bd994d74af2e56f59d17688f (diff)
chore: Codebase improvements, add groundwork for #122.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'src')
-rw-r--r--src/boot/BootKit/BootKit.h1
-rw-r--r--src/kernel/KernelKit/ZXD.h7
-rw-r--r--src/kernel/NeKit/Array.h6
-rw-r--r--src/kernel/NeKit/Atom.h2
-rw-r--r--src/kernel/NeKit/Config.h5
5 files changed, 17 insertions, 4 deletions
diff --git a/src/boot/BootKit/BootKit.h b/src/boot/BootKit/BootKit.h
index fe90601e..fa10e6cf 100644
--- a/src/boot/BootKit/BootKit.h
+++ b/src/boot/BootKit/BootKit.h
@@ -35,6 +35,7 @@
/// Framebuffer helpers.
/***********************************************************************************/
+/// @brief The **BootZ** namespace.
namespace Boot {
void ThrowError(const WideChar* errorCode, const WideChar* reason);
diff --git a/src/kernel/KernelKit/ZXD.h b/src/kernel/KernelKit/ZXD.h
index 6b387452..b40ecdb5 100644
--- a/src/kernel/KernelKit/ZXD.h
+++ b/src/kernel/KernelKit/ZXD.h
@@ -11,10 +11,11 @@
#define kZXDVersion (0x0001)
namespace Kernel {
+
struct ZxdExec;
struct ZxdStub;
-enum struct ZxdFlags {
+enum struct ZxdFlags : Int32 {
kZXDFlagsInvalid = 0,
kZXDFlagsDriver = 120,
kZXDFlagsBoot,
@@ -51,10 +52,14 @@ struct PACKED ZxdStub final {
};
inline constexpr auto kDriverName = ".drvr";
+
+/// @note This is ProcessSanitizer specific.
inline constexpr auto kProsanName = ".pros";
using ZxdExecPtr = ZxdExec*;
+
using ZxdStubPtr = ZxdStub*;
+
} // namespace Kernel
#endif
diff --git a/src/kernel/NeKit/Array.h b/src/kernel/NeKit/Array.h
index 94cfebe1..0d114088 100644
--- a/src/kernel/NeKit/Array.h
+++ b/src/kernel/NeKit/Array.h
@@ -10,7 +10,8 @@
#include <NeKit/ErrorOr.h>
namespace Kernel {
-template <typename T, SizeT N>
+
+template <class T, SizeT N>
class Array final {
public:
explicit Array() = default;
@@ -36,10 +37,11 @@ class Array final {
T fArray[N];
};
-template <typename ValueType>
+template <class ValueType>
inline auto make_array(ValueType& val) -> auto {
return Array<ValueType, ARRAY_SIZE(val)>{val};
}
+
} // namespace Kernel
#endif
diff --git a/src/kernel/NeKit/Atom.h b/src/kernel/NeKit/Atom.h
index 17f26bcf..fa90dfa9 100644
--- a/src/kernel/NeKit/Atom.h
+++ b/src/kernel/NeKit/Atom.h
@@ -21,6 +21,8 @@ class Atom final {
public:
using Type = TypeAtomic;
+ using Ref = TypeAtomic&;
+ using ConstRef = const TypeAtomic&;
const TypeAtomic& operator[](const SizeT& bit) { return (fArrayOfAtoms & (1 << bit)); }
diff --git a/src/kernel/NeKit/Config.h b/src/kernel/NeKit/Config.h
index 3e37fe2d..e18cae54 100644
--- a/src/kernel/NeKit/Config.h
+++ b/src/kernel/NeKit/Config.h
@@ -19,8 +19,9 @@
public \
::Kernel::ICodec
-/// @brief The **Kernel** namespace.
+/// @brief The **NeKernel** namespace.
namespace Kernel {
+
using voidPtr = void*;
using VoidPtr = void*;
using nullPtr = decltype(nullptr);
@@ -208,6 +209,7 @@ struct TrueResult final {
static constexpr bool kValue = true;
};
+
template <class Type>
struct PropertyResult final {
using ResultType = Type;
@@ -218,6 +220,7 @@ struct PropertyResult final {
static constexpr bool kValue = Type::kValue;
};
+
} // namespace Kernel
#endif