summaryrefslogtreecommitdiffhomepage
path: root/Public/SDK/SystemKit
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-01-29 18:17:47 +0100
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-01-29 18:18:59 +0100
commit65254486efff0fd1bb78a48ff90b7713a5ce539f (patch)
tree20ce02c12a74ba9e6cd382bf9c1f09a0c611cb4d /Public/SDK/SystemKit
parentf03986937db0b927da4b10554801e18e4dc7c43f (diff)
Kernel: Update TODO.
Src: Refactorings according to clang-format. Meta: Update specification. Public: Remove useless UIKit. Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Public/SDK/SystemKit')
-rw-r--r--Public/SDK/SystemKit/FileAPI.hxx39
-rw-r--r--Public/SDK/SystemKit/HeapAPI.hxx67
-rw-r--r--Public/SDK/SystemKit/ThreadAPI.hxx33
3 files changed, 66 insertions, 73 deletions
diff --git a/Public/SDK/SystemKit/FileAPI.hxx b/Public/SDK/SystemKit/FileAPI.hxx
index 089a5882..12b57a41 100644
--- a/Public/SDK/SystemKit/FileAPI.hxx
+++ b/Public/SDK/SystemKit/FileAPI.hxx
@@ -15,27 +15,26 @@
using namespace hCore;
-class HFile final
-{
- public:
- explicit HFile(const char *path);
- ~HFile();
-
- public:
- HCORE_COPY_DEFAULT(HFile);
-
- public:
- void *Read(SizeT off, SizeT sz);
- void Write(void *buf, SizeT off, SizeT sz);
- void Seek(SizeT off);
- void *Read(SizeT sz);
- void Write(void *buf, SizeT sz);
- void Rewind();
-
- public:
- void SetMIME(const char *mime);
+class HFile final {
+ public:
+ explicit HFile(const char *path);
+ ~HFile();
+
+ public:
+ HCORE_COPY_DEFAULT(HFile);
+
+ public:
+ void *Read(SizeT off, SizeT sz);
+ void Write(void *buf, SizeT off, SizeT sz);
+ void Seek(SizeT off);
+ void *Read(SizeT sz);
+ void Write(void *buf, SizeT sz);
+ void Rewind();
+
+ public:
+ void SetMIME(const char *mime);
};
typedef HFile *HFilePtr;
-#endif // ifndef _SYSTEM_KIT_HCORE_FILE_HPP
+#endif // ifndef _SYSTEM_KIT_HCORE_FILE_HPP
diff --git a/Public/SDK/SystemKit/HeapAPI.hxx b/Public/SDK/SystemKit/HeapAPI.hxx
index 8f89235c..aa082ca6 100644
--- a/Public/SDK/SystemKit/HeapAPI.hxx
+++ b/Public/SDK/SystemKit/HeapAPI.hxx
@@ -18,51 +18,48 @@ class HMemoryException;
typedef VoidPtr HHeapPtr;
-enum
-{
- kHeapExpandable = 2,
- kHeapNoExecute = 4,
- kHeapShared = 6,
- kHeapReadOnly = 8,
- kHeapNoFlags = 0
+enum {
+ kHeapExpandable = 2,
+ kHeapNoExecute = 4,
+ kHeapShared = 6,
+ kHeapReadOnly = 8,
+ kHeapNoFlags = 0
};
-class HHeap final
-{
- private:
- explicit HHeap();
+class HHeap final {
+ private:
+ explicit HHeap();
- public:
- ~HHeap();
+ public:
+ ~HHeap();
- public:
- HCORE_COPY_DEFAULT(HHeap);
+ public:
+ HCORE_COPY_DEFAULT(HHeap);
- public:
- static HHeap *Shared() noexcept;
+ public:
+ static HHeap *Shared() noexcept;
- public:
- void Delete(HHeapPtr me) noexcept;
- SizeT Tell(HHeapPtr me) noexcept;
- HHeapPtr New(const SizeT &sz, const Int32 flags = kHeapNoFlags);
+ public:
+ void Delete(HHeapPtr me) noexcept;
+ SizeT Tell(HHeapPtr me) noexcept;
+ HHeapPtr New(const SizeT &sz, const Int32 flags = kHeapNoFlags);
};
-class HMemoryException final
-{
- public:
- HMemoryException() = default;
- ~HMemoryException() = default;
+class HMemoryException final {
+ public:
+ HMemoryException() = default;
+ ~HMemoryException() = default;
- public:
- HCORE_COPY_DEFAULT(HMemoryException);
+ public:
+ HCORE_COPY_DEFAULT(HMemoryException);
- public:
- const char *Name();
- const char *Reason();
+ public:
+ const char *Name();
+ const char *Reason();
- private:
- const char *mReason{"Memory error!"};
+ private:
+ const char *mReason{"Memory error!"};
- private:
- friend HHeap;
+ private:
+ friend HHeap;
};
diff --git a/Public/SDK/SystemKit/ThreadAPI.hxx b/Public/SDK/SystemKit/ThreadAPI.hxx
index 8d948a35..24fc8507 100644
--- a/Public/SDK/SystemKit/ThreadAPI.hxx
+++ b/Public/SDK/SystemKit/ThreadAPI.hxx
@@ -16,27 +16,24 @@
#include <NewKit/Defines.hpp>
-namespace hCore
-{
+namespace hCore {
/// @brief Thread Information Block for Local Storage.
/// Located in GS on AMD64, Virtual Address 0x10000 (64x0, 32x0, ARM64)
-struct ThreadInformationBlock final
-{
- const Char TIB_NAME[255]; // Module Name
- const UIntPtr TIB_START_CODE; // Start Address
- const UIntPtr TIB_START_ALLOC; // Allocation Heap
- const UIntPtr TIB_START_STACK; // Stack Pointer.
- const Int32 TIB_ARCH; // Architecture and/or platform.
+struct ThreadInformationBlock final {
+ const Char TIB_NAME[255]; // Module Name
+ const UIntPtr TIB_START_CODE; // Start Address
+ const UIntPtr TIB_START_ALLOC; // Allocation Heap
+ const UIntPtr TIB_START_STACK; // Stack Pointer.
+ const Int32 TIB_ARCH; // Architecture and/or platform.
};
-enum
-{
- kPC_IA64,
- kPC_AMD64 = kPC_IA64,
- kPC_ARM,
- kMACS_64x0,
- kMACS_32x0,
+enum {
+ kPC_IA64,
+ kPC_AMD64 = kPC_IA64,
+ kPC_ARM,
+ kMACS_64x0,
+ kMACS_32x0,
};
-} // namespace hCore
+} // namespace hCore
-#endif // __THREAD_API__
+#endif // __THREAD_API__