summaryrefslogtreecommitdiffhomepage
path: root/Kernel/NewKit
diff options
context:
space:
mode:
authorAmlal EL Mahrouss <amlalelmahrouss@icloud.com>2024-07-02 22:00:35 +0200
committerAmlal EL Mahrouss <amlalelmahrouss@icloud.com>2024-07-02 22:00:49 +0200
commit375d0210dcb2070a12d916523f4a1dafff28360c (patch)
treed0c217f529b8069ea659778c2ee9ca20aeba33a4 /Kernel/NewKit
parentf1d3744829a661d1600c2f3bbdbdf679ee0bd0e1 (diff)
MHR-36: Change namespace name, got out of the codename stage.
Signed-off-by: Amlal EL Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'Kernel/NewKit')
-rw-r--r--Kernel/NewKit/ApplicationInterface.hxx6
-rw-r--r--Kernel/NewKit/Array.hpp4
-rw-r--r--Kernel/NewKit/ArrayList.hpp4
-rw-r--r--Kernel/NewKit/Atom.hpp4
-rw-r--r--Kernel/NewKit/Crc32.hpp6
-rw-r--r--Kernel/NewKit/Defines.hpp14
-rw-r--r--Kernel/NewKit/ErrorOr.hpp6
-rw-r--r--Kernel/NewKit/Function.hpp4
-rw-r--r--Kernel/NewKit/Json.hpp6
-rw-r--r--Kernel/NewKit/KernelCheck.hpp8
-rw-r--r--Kernel/NewKit/Macros.hpp2
-rw-r--r--Kernel/NewKit/MutableArray.hpp8
-rw-r--r--Kernel/NewKit/OwnPtr.hpp4
-rw-r--r--Kernel/NewKit/PageAllocator.hpp4
-rw-r--r--Kernel/NewKit/PageManager.hpp4
-rw-r--r--Kernel/NewKit/Pair.hpp4
-rw-r--r--Kernel/NewKit/Pmm.hpp4
-rw-r--r--Kernel/NewKit/Ref.hpp4
-rw-r--r--Kernel/NewKit/Stream.hpp4
-rw-r--r--Kernel/NewKit/String.hpp4
-rw-r--r--Kernel/NewKit/Utils.hpp4
-rw-r--r--Kernel/NewKit/Variant.hpp4
22 files changed, 56 insertions, 56 deletions
diff --git a/Kernel/NewKit/ApplicationInterface.hxx b/Kernel/NewKit/ApplicationInterface.hxx
index 46d95095..66737db7 100644
--- a/Kernel/NewKit/ApplicationInterface.hxx
+++ b/Kernel/NewKit/ApplicationInterface.hxx
@@ -20,12 +20,12 @@
typedef struct _ApplicationInterface final
{
/// @brief Releases the object exit the process on main object.
- NewOS::Void (*Release)(struct _Application* Self, NewOS::Int32 ExitCode);
+ Kernel::Void (*Release)(struct _Application* Self, Kernel::Int32 ExitCode);
/// @brief Invoke a function from the application object.
- NewOS::IntPtr (*Invoke)(struct _Application* Self, NewOS::Int32 Sel, ...);
+ Kernel::IntPtr (*Invoke)(struct _Application* Self, Kernel::Int32 Sel, ...);
/// @brief Query a new application object from a GUID.
/// @note this doesn't query a process, it query a registered object withtin that app.
- NewOS::Void (*Query)(struct _Application* Self, NewOS::VoidPtr* Dst, NewOS::SizeT SzDst, NewOS::XRN::GUIDSequence GuidOf);
+ Kernel::Void (*Query)(struct _Application* Self, Kernel::VoidPtr* Dst, Kernel::SizeT SzDst, Kernel::XRN::GUIDSequence GuidOf);
} ApplicationInterface, *ApplicationInterfaceRef;
#define app_cast reinterpret_cast<ApplicationInterfaceRef>
diff --git a/Kernel/NewKit/Array.hpp b/Kernel/NewKit/Array.hpp
index b0b94584..447d2616 100644
--- a/Kernel/NewKit/Array.hpp
+++ b/Kernel/NewKit/Array.hpp
@@ -9,7 +9,7 @@
#include <NewKit/ErrorOr.hpp>
#include <NewKit/Defines.hpp>
-namespace NewOS
+namespace Kernel
{
template <typename T, Size N>
class Array final
@@ -58,4 +58,4 @@ namespace NewOS
private:
T fArray[N];
};
-} // namespace NewOS
+} // namespace Kernel
diff --git a/Kernel/NewKit/ArrayList.hpp b/Kernel/NewKit/ArrayList.hpp
index 9afcfcbe..e701f10b 100644
--- a/Kernel/NewKit/ArrayList.hpp
+++ b/Kernel/NewKit/ArrayList.hpp
@@ -8,7 +8,7 @@
#include <NewKit/Defines.hpp>
-namespace NewOS
+namespace Kernel
{
template <typename T>
class ArrayList final
@@ -55,4 +55,4 @@ namespace NewOS
{
return ArrayList<ValueType>{val};
}
-} // namespace NewOS
+} // namespace Kernel
diff --git a/Kernel/NewKit/Atom.hpp b/Kernel/NewKit/Atom.hpp
index f7e686cd..69d485fb 100644
--- a/Kernel/NewKit/Atom.hpp
+++ b/Kernel/NewKit/Atom.hpp
@@ -7,7 +7,7 @@
#include <NewKit/Defines.hpp>
-namespace NewOS
+namespace Kernel
{
template <typename T>
class Atom final
@@ -43,4 +43,4 @@ namespace NewOS
private:
T fArrayOfAtoms;
};
-} // namespace NewOS
+} // namespace Kernel
diff --git a/Kernel/NewKit/Crc32.hpp b/Kernel/NewKit/Crc32.hpp
index b32b92ff..c7d42710 100644
--- a/Kernel/NewKit/Crc32.hpp
+++ b/Kernel/NewKit/Crc32.hpp
@@ -1,7 +1,7 @@
/*
* ========================================================
*
- * NewOS Date Added: 13/02/2023
+ * Kernel Date Added: 13/02/2023
* Copyright Zeta Electronics Corporation, all rights reserved.
*
* ========================================================
@@ -14,9 +14,9 @@
#define kCrcCnt (256)
-namespace NewOS
+namespace Kernel
{
UInt ke_calculate_crc32(const Char* crc, UInt len) noexcept;
-} // namespace NewOS
+} // namespace Kernel
#endif // !__CRC32_H__
diff --git a/Kernel/NewKit/Defines.hpp b/Kernel/NewKit/Defines.hpp
index 00fb5df9..af8978da 100644
--- a/Kernel/NewKit/Defines.hpp
+++ b/Kernel/NewKit/Defines.hpp
@@ -22,8 +22,8 @@
#endif
#endif
-/// @brief NewOS namespace.
-namespace NewOS
+/// @brief The **newoskrnl** namespace where it's API resides.
+namespace Kernel
{
using voidPtr = void*;
using VoidPtr = void*;
@@ -131,17 +131,17 @@ namespace NewOS
return type.template As<Y>();
}
};
-} // namespace NewOS
+} // namespace Kernel
#define DEDUCE_ENDIAN(address, value) \
- (((reinterpret_cast<NewOS::Char*>(address)[0]) == (value)) \
- ? (NewOS::Endian::kEndianBig) \
- : (NewOS::Endian::kEndianLittle))
+ (((reinterpret_cast<Kernel::Char*>(address)[0]) == (value)) \
+ ? (Kernel::Endian::kEndianBig) \
+ : (Kernel::Endian::kEndianLittle))
#define Yes (true)
#define No (false)
-#define VoidStar NewOS::voidPtr
+#define VoidStar Kernel::voidPtr
#ifdef INIT
#undef INIT
diff --git a/Kernel/NewKit/ErrorOr.hpp b/Kernel/NewKit/ErrorOr.hpp
index 343039b5..34697d8a 100644
--- a/Kernel/NewKit/ErrorOr.hpp
+++ b/Kernel/NewKit/ErrorOr.hpp
@@ -1,7 +1,7 @@
/*
* ========================================================
*
- * NewOS
+ * Kernel
* Copyright Zeta Electronics Corporation, all rights reserved.
*
* ========================================================
@@ -12,7 +12,7 @@
#include <NewKit/Defines.hpp>
#include <NewKit/Ref.hpp>
-namespace NewOS
+namespace Kernel
{
using ErrorT = UInt;
@@ -69,4 +69,4 @@ namespace NewOS
using ErrorOrAny = ErrorOr<voidPtr>;
-} // namespace NewOS
+} // namespace Kernel
diff --git a/Kernel/NewKit/Function.hpp b/Kernel/NewKit/Function.hpp
index 12ae03f3..186c1961 100644
--- a/Kernel/NewKit/Function.hpp
+++ b/Kernel/NewKit/Function.hpp
@@ -3,7 +3,7 @@
#include <NewKit/Defines.hpp>
-namespace NewOS
+namespace Kernel
{
template <typename T, typename... Args>
class Function final
@@ -48,6 +48,6 @@ namespace NewOS
T(*fFn)
(Args... args);
};
-} // namespace NewOS
+} // namespace Kernel
#endif // !_INC_FUNCTION_HPP__
diff --git a/Kernel/NewKit/Json.hpp b/Kernel/NewKit/Json.hpp
index 33431c57..b2a0d872 100644
--- a/Kernel/NewKit/Json.hpp
+++ b/Kernel/NewKit/Json.hpp
@@ -15,14 +15,14 @@
#include <NewKit/String.hpp>
#include <NewKit/Utils.hpp>
-namespace NewOS
+namespace Kernel
{
/// @brief Json value class
class JsonType final
{
public:
explicit JsonType()
- : NewOS::JsonType(1, 1)
+ : Kernel::JsonType(1, 1)
{
}
@@ -115,4 +115,4 @@ namespace NewOS
};
using JsonStream = Stream<JsonStreamTrait, JsonType>;
-} // namespace NewOS
+} // namespace Kernel
diff --git a/Kernel/NewKit/KernelCheck.hpp b/Kernel/NewKit/KernelCheck.hpp
index 046cab3d..ae1eec51 100644
--- a/Kernel/NewKit/KernelCheck.hpp
+++ b/Kernel/NewKit/KernelCheck.hpp
@@ -9,14 +9,14 @@
#include <NewKit/Defines.hpp>
-namespace NewOS
+namespace Kernel
{
void ke_runtime_check(bool bExpression, const char* file, const char* line);
}
#define MUST_PASS_COMPILER(EXPR, MSG) static_assert(EXPR, MSG)
#define __MUST_PASS(EXPR, FILE, LINE) \
- NewOS::ke_runtime_check(EXPR, FILE, STRINGIFY(LINE))
+ Kernel::ke_runtime_check(EXPR, FILE, STRINGIFY(LINE))
#define MUST_PASS(EXPR) __MUST_PASS(EXPR, __FILE__, __LINE__)
#define assert(EXPR) MUST_PASS(EXPR, RUNTIME_CHECK_EXPRESSION)
@@ -38,7 +38,7 @@ enum RUNTIME_CHECK
RUNTIME_CHECK_COUNT,
};
-namespace NewOS
+namespace Kernel
{
class DumpManager final
{
@@ -50,7 +50,7 @@ namespace NewOS
};
void ke_stop(const Int& id);
-} // namespace NewOS
+} // namespace Kernel
#ifdef TRY
#undef TRY
diff --git a/Kernel/NewKit/Macros.hpp b/Kernel/NewKit/Macros.hpp
index e267b523..1f121a37 100644
--- a/Kernel/NewKit/Macros.hpp
+++ b/Kernel/NewKit/Macros.hpp
@@ -25,7 +25,7 @@
#ifndef ARRAY_SIZE
#define ARRAY_SIZE(a) \
(((sizeof(a) / sizeof(*(a))) / \
- (static_cast<NewOS::Size>(!(sizeof(a) % sizeof(*(a)))))))
+ (static_cast<Kernel::Size>(!(sizeof(a) % sizeof(*(a)))))))
#endif
#ifndef ALIGN
diff --git a/Kernel/NewKit/MutableArray.hpp b/Kernel/NewKit/MutableArray.hpp
index 6be9c15e..6f30b0f9 100644
--- a/Kernel/NewKit/MutableArray.hpp
+++ b/Kernel/NewKit/MutableArray.hpp
@@ -38,7 +38,7 @@
// FIXME: this is a shitty algorithm, which is consumer hungry.
// Remove and occurences of that, and remove that class.
-namespace NewOS
+namespace Kernel
{
template <typename T>
class MutableArray;
@@ -149,7 +149,7 @@ namespace NewOS
MutableLinkedList<T>* fFirstNode{nullptr};
/* Number of nodes inside of this dynamic array. */
- NewOS::SizeT fNodeCount{0};
+ Kernel::SizeT fNodeCount{0};
private:
// don't remove that
@@ -234,6 +234,6 @@ namespace NewOS
MutableLinkedList<T>* fFirstNode{nullptr};
/* Number of nodes inside of this dynamic array. */
- NewOS::SizeT fNodeCount{0};
+ Kernel::SizeT fNodeCount{0};
};
-} // namespace NewOS
+} // namespace Kernel
diff --git a/Kernel/NewKit/OwnPtr.hpp b/Kernel/NewKit/OwnPtr.hpp
index c07f5119..2d7cf65b 100644
--- a/Kernel/NewKit/OwnPtr.hpp
+++ b/Kernel/NewKit/OwnPtr.hpp
@@ -11,7 +11,7 @@
#include <NewKit/KernelCheck.hpp>
#include <NewKit/Ref.hpp>
-namespace NewOS
+namespace Kernel
{
template <typename T>
class OwnPtr;
@@ -91,4 +91,4 @@ namespace NewOS
return ret;
}
-} // namespace NewOS
+} // namespace Kernel
diff --git a/Kernel/NewKit/PageAllocator.hpp b/Kernel/NewKit/PageAllocator.hpp
index 5f307d79..40da5129 100644
--- a/Kernel/NewKit/PageAllocator.hpp
+++ b/Kernel/NewKit/PageAllocator.hpp
@@ -9,7 +9,7 @@
#include <NewKit/Defines.hpp>
#include <NewKit/PageManager.hpp>
-namespace NewOS
+namespace Kernel
{
namespace Detail
{
@@ -17,4 +17,4 @@ namespace NewOS
void exec_disable(UIntPtr addr);
bool page_disable(UIntPtr addr);
} // namespace Detail
-} // namespace NewOS
+} // namespace Kernel
diff --git a/Kernel/NewKit/PageManager.hpp b/Kernel/NewKit/PageManager.hpp
index 030d839f..233ced0a 100644
--- a/Kernel/NewKit/PageManager.hpp
+++ b/Kernel/NewKit/PageManager.hpp
@@ -17,7 +17,7 @@
#define kBadAddress (0)
#endif // #ifndef kBadAddress
-namespace NewOS
+namespace Kernel
{
class PageManager;
@@ -78,4 +78,4 @@ namespace NewOS
friend PTEWrapper;
friend class Pmm;
};
-} // namespace NewOS
+} // namespace Kernel
diff --git a/Kernel/NewKit/Pair.hpp b/Kernel/NewKit/Pair.hpp
index 058a579d..7a7df020 100644
--- a/Kernel/NewKit/Pair.hpp
+++ b/Kernel/NewKit/Pair.hpp
@@ -8,7 +8,7 @@
#include <NewKit/Defines.hpp>
-namespace NewOS
+namespace Kernel
{
-} // namespace NewOS
+} // namespace Kernel
diff --git a/Kernel/NewKit/Pmm.hpp b/Kernel/NewKit/Pmm.hpp
index b6b22382..fc020fea 100644
--- a/Kernel/NewKit/Pmm.hpp
+++ b/Kernel/NewKit/Pmm.hpp
@@ -10,7 +10,7 @@
#include <NewKit/PageManager.hpp>
#include <NewKit/Ref.hpp>
-namespace NewOS
+namespace Kernel
{
class Pmm;
class PTEWrapper;
@@ -41,4 +41,4 @@ namespace NewOS
private:
Ref<PageManager> fPageManager;
};
-} // namespace NewOS
+} // namespace Kernel
diff --git a/Kernel/NewKit/Ref.hpp b/Kernel/NewKit/Ref.hpp
index 5f942baf..0d5550fa 100644
--- a/Kernel/NewKit/Ref.hpp
+++ b/Kernel/NewKit/Ref.hpp
@@ -10,7 +10,7 @@
#include <NewKit/Defines.hpp>
#include <NewKit/KernelCheck.hpp>
-namespace NewOS
+namespace Kernel
{
template <typename T>
class Ref final
@@ -86,4 +86,4 @@ namespace NewOS
private:
Ref<T> fRef{nullptr};
};
-} // namespace NewOS
+} // namespace Kernel
diff --git a/Kernel/NewKit/Stream.hpp b/Kernel/NewKit/Stream.hpp
index 11dfec63..bd64910e 100644
--- a/Kernel/NewKit/Stream.hpp
+++ b/Kernel/NewKit/Stream.hpp
@@ -10,7 +10,7 @@
#include <NewKit/Defines.hpp>
#include <NewKit/Ref.hpp>
-namespace NewOS
+namespace Kernel
{
template <typename StreamTrait, typename Kind>
class Stream final
@@ -55,4 +55,4 @@ namespace NewOS
Ref<StreamTrait> fStream;
Ref<Kind> fKind;
};
-} // namespace NewOS
+} // namespace Kernel
diff --git a/Kernel/NewKit/String.hpp b/Kernel/NewKit/String.hpp
index 14286ca0..f9ab9aa4 100644
--- a/Kernel/NewKit/String.hpp
+++ b/Kernel/NewKit/String.hpp
@@ -10,7 +10,7 @@
#include <NewKit/ErrorOr.hpp>
#include <NewKit/KernelCheck.hpp>
-namespace NewOS
+namespace Kernel
{
class StringView final
{
@@ -73,4 +73,4 @@ namespace NewOS
static const char* Format(const char* fmt, const char* from);
static bool Equals(const char* lhs, const char* rhs);
};
-} // namespace NewOS
+} // namespace Kernel
diff --git a/Kernel/NewKit/Utils.hpp b/Kernel/NewKit/Utils.hpp
index d162c25c..22192135 100644
--- a/Kernel/NewKit/Utils.hpp
+++ b/Kernel/NewKit/Utils.hpp
@@ -9,7 +9,7 @@
#include <NewKit/Defines.hpp>
-namespace NewOS
+namespace Kernel
{
Int rt_copy_memory(const voidPtr src, voidPtr dst, Size len);
Int rt_move_memory(const voidPtr src, voidPtr dst, Size len);
@@ -26,4 +26,4 @@ namespace NewOS
Int rt_to_lower(Int c);
voidPtr rt_string_in_string(const char* in, const char* needle);
char* rt_string_has_char(char* str, const char chr);
-} // namespace NewOS
+} // namespace Kernel
diff --git a/Kernel/NewKit/Variant.hpp b/Kernel/NewKit/Variant.hpp
index 2e097b9d..ee14216a 100644
--- a/Kernel/NewKit/Variant.hpp
+++ b/Kernel/NewKit/Variant.hpp
@@ -9,7 +9,7 @@
#include <NewKit/Defines.hpp>
#include <NewKit/String.hpp>
-namespace NewOS
+namespace Kernel
{
class Variant final
{
@@ -51,4 +51,4 @@ namespace NewOS
voidPtr fPtr{nullptr};
VariantKind fKind{VariantKind::kUndefined};
};
-} // namespace NewOS
+} // namespace Kernel