summaryrefslogtreecommitdiffhomepage
path: root/Public
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-03-23 21:40:37 +0100
committerAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-03-23 21:40:37 +0100
commit09383c793fe953da6441902b4f66b1382df46738 (patch)
tree9c4e4040ad28818c6f13c96375221609cfc773a5 /Public
parentd9477b8a80ee0dc9a6d05c0353aa989ceaedae8a (diff)
Kernel: See below.
Fix BUG inside ATA driver: Due to bad cast on lba select. Add ToolBox APIs for kernel GUI. Userland: See below. Worked a bit on System.Core, just wrapped Thread.hxx into the System namespace. Signed-off-by: Amlal El Mahrouss <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'Public')
-rw-r--r--Public/SDK/System.Core/Headers/Heap.hxx3
-rw-r--r--Public/SDK/System.Core/Headers/Thread.hxx7
-rw-r--r--Public/SDK/System.Core/Sources/New+Delete.cxx45
3 files changed, 25 insertions, 30 deletions
diff --git a/Public/SDK/System.Core/Headers/Heap.hxx b/Public/SDK/System.Core/Headers/Heap.hxx
index 14ee0e6c..0d7103c5 100644
--- a/Public/SDK/System.Core/Headers/Heap.hxx
+++ b/Public/SDK/System.Core/Headers/Heap.hxx
@@ -9,7 +9,8 @@
#include <System.Core/Headers/Defines.hxx>
namespace System {
-class MemoryException;
+class HeapException;
+class HeapInterface;
typedef PtrVoidType PtrHeapType;
diff --git a/Public/SDK/System.Core/Headers/Thread.hxx b/Public/SDK/System.Core/Headers/Thread.hxx
index c32c6047..7b586cd1 100644
--- a/Public/SDK/System.Core/Headers/Thread.hxx
+++ b/Public/SDK/System.Core/Headers/Thread.hxx
@@ -13,10 +13,15 @@
#include <System.Core/Headers/Defines.hxx>
-/// @brief Thread Information Block, which holds information about the running thread.
+namespace System {
+/// @brief Thread Information Block, which holds information about the running
+/// thread.
typedef PtrVoidType PtrThread;
/// @brief Main application thread.
CA_EXTERN_C PtrThread kMainThread;
+class ThreadInterface;
+} // namespace System
+
#endif // __THREAD_API__
diff --git a/Public/SDK/System.Core/Sources/New+Delete.cxx b/Public/SDK/System.Core/Sources/New+Delete.cxx
index 019db66c..fe8ed43f 100644
--- a/Public/SDK/System.Core/Sources/New+Delete.cxx
+++ b/Public/SDK/System.Core/Sources/New+Delete.cxx
@@ -14,52 +14,41 @@ enum HcAllocationKind {
};
CA_EXTERN_C PtrVoidType HcAllocateProcessHeap(ObjectPtr refObj, QWordType sz,
- DWordType flags);
+ DWordType flags);
CA_EXTERN_C BooleanType HcProcessHeapExists(ObjectPtr refObj, PtrVoidType ptr);
CA_EXTERN_C QWordType HcProcessHeapSize(ObjectPtr refObj, PtrVoidType ptr);
CA_EXTERN_C VoidType HcFreeProcessHeap(ObjectPtr refObj, PtrVoidType ptr);
typedef SizeType size_t;
-void* operator new[](size_t sz)
-{
- if (sz == 0)
- ++sz;
+void* operator new[](size_t sz) {
+ if (sz == 0) ++sz;
- return HcAllocateProcessHeap(kInstanceObject, sz, kStandardAllocation);
+ return HcAllocateProcessHeap(kInstanceObject, sz, kStandardAllocation);
}
-void* operator new(size_t sz)
-{
- if (sz == 0)
- ++sz;
+void* operator new(size_t sz) {
+ if (sz == 0) ++sz;
- return HcAllocateProcessHeap(kInstanceObject, sz, kArrayAllocation);
+ return HcAllocateProcessHeap(kInstanceObject, sz, kArrayAllocation);
}
-void operator delete[](void* ptr)
-{
- if (ptr == nullptr)
- return;
+void operator delete[](void* ptr) {
+ if (ptr == nullptr) return;
- HcFreeProcessHeap(kInstanceObject, ptr);
+ HcFreeProcessHeap(kInstanceObject, ptr);
}
-void operator delete(void* ptr)
-{
- if (ptr == nullptr)
- return;
+void operator delete(void* ptr) {
+ if (ptr == nullptr) return;
- HcFreeProcessHeap(kInstanceObject, ptr);
+ HcFreeProcessHeap(kInstanceObject, ptr);
}
-void operator delete(void* ptr, size_t sz)
-{
- if (ptr == nullptr)
- return;
+void operator delete(void* ptr, size_t sz) {
+ if (ptr == nullptr) return;
- (void)sz;
+ (void)sz;
- HcFreeProcessHeap(kInstanceObject, ptr);
+ HcFreeProcessHeap(kInstanceObject, ptr);
}
-