summaryrefslogtreecommitdiffhomepage
path: root/Public/Kits/System.Core
diff options
context:
space:
mode:
authoramlal <amlal@el-mahrouss-logic.com>2024-03-16 14:22:21 +0100
committeramlal <amlal@el-mahrouss-logic.com>2024-03-16 14:22:21 +0100
commit55059428bfd6a18451bc1ed3ee64e7bb04c395cd (patch)
tree02dd524a2249111e30d2208fd700fa72e31182db /Public/Kits/System.Core
parent8f9b5e08f53f6e49a1f4c6b20e17c54298da9c44 (diff)
HCR-14: See below.
- Pretty big modifications, add kernel mouse. Signed-off-by: amlal <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'Public/Kits/System.Core')
-rw-r--r--Public/Kits/System.Core/Containers/XIFF.hxx2
-rw-r--r--Public/Kits/System.Core/Defs.hxx (renamed from Public/Kits/System.Core/CoreAPI.hxx)27
-rw-r--r--Public/Kits/System.Core/File.hxx (renamed from Public/Kits/System.Core/FileAPI.hxx)0
-rw-r--r--Public/Kits/System.Core/HCoreBase.hxx2
-rw-r--r--Public/Kits/System.Core/Heap.cxx (renamed from Public/Kits/System.Core/HeapAPI.cxx)4
-rw-r--r--Public/Kits/System.Core/Heap.hxx (renamed from Public/Kits/System.Core/HeapAPI.hxx)10
-rw-r--r--Public/Kits/System.Core/System.Core.hxx (renamed from Public/Kits/System.Core/hcore.h)0
-rw-r--r--Public/Kits/System.Core/System.hxx6
8 files changed, 34 insertions, 17 deletions
diff --git a/Public/Kits/System.Core/Containers/XIFF.hxx b/Public/Kits/System.Core/Containers/XIFF.hxx
index dbfe5b04..002d05f4 100644
--- a/Public/Kits/System.Core/Containers/XIFF.hxx
+++ b/Public/Kits/System.Core/Containers/XIFF.hxx
@@ -12,7 +12,7 @@
------------------------------------------------------- */
-#include <System.Core/CoreAPI.hxx>
+#include <System.Core/Defs.hxx>
/// @brief four-character code for XIFF.
#define kFourCCLength_XIFF 4
diff --git a/Public/Kits/System.Core/CoreAPI.hxx b/Public/Kits/System.Core/Defs.hxx
index 66d356d7..3ebe5c2c 100644
--- a/Public/Kits/System.Core/CoreAPI.hxx
+++ b/Public/Kits/System.Core/Defs.hxx
@@ -14,11 +14,26 @@
#undef CA_MUST_PASS
#endif
-// unused by user side, it's a kernel thing.
-#define CA_MUST_PASS(e) ((void)e)
+#define CA_UNREFERENCED_PARAMETER(e) ((void)e)
+
+/// Assertion macros.
+
+#ifdef _DEBUG
+#define CA_MUST_PASS(e) __assert(e)
+#else
+#define CA_MUST_PASS(e) CA_UNREFERENCED_PARAMETER(e)
+#endif
+
+#ifdef __cplusplus
#define CA_EXTERN_C extern "C"
+#else
+
+#define CA_EXTERN_C extern
+
+#endif
+
#define CA_STDCALL __attribute__((stdcall))
#define CA_CDECL __attribute__((cdecl))
#define CA_MSCALL __attribute__((ms_abi))
@@ -53,4 +68,10 @@ typedef WCHAR* PWCHAR;
#endif
#define CA_STATIC static
-#define CA_INLINE inline \ No newline at end of file
+#define CA_INLINE inline
+
+#ifdef __cplusplus
+#define CA_CONSTEXPR constexpr
+#else
+#define CA_CONSTEXPR
+#endif // __cplusplus
diff --git a/Public/Kits/System.Core/FileAPI.hxx b/Public/Kits/System.Core/File.hxx
index 2f799330..2f799330 100644
--- a/Public/Kits/System.Core/FileAPI.hxx
+++ b/Public/Kits/System.Core/File.hxx
diff --git a/Public/Kits/System.Core/HCoreBase.hxx b/Public/Kits/System.Core/HCoreBase.hxx
index c8a3a99c..5bb6f9af 100644
--- a/Public/Kits/System.Core/HCoreBase.hxx
+++ b/Public/Kits/System.Core/HCoreBase.hxx
@@ -4,7 +4,7 @@
#pragma once
-#include <System.Core/CoreAPI.hxx>
+#include <System.Core/Defs.hxx>
typedef struct HcObject {
void(*Release)(void);
diff --git a/Public/Kits/System.Core/HeapAPI.cxx b/Public/Kits/System.Core/Heap.cxx
index 232b4927..c7401aad 100644
--- a/Public/Kits/System.Core/HeapAPI.cxx
+++ b/Public/Kits/System.Core/Heap.cxx
@@ -4,8 +4,8 @@
------------------------------------------- */
-#include <System.Core/HeapAPI.hxx>
-#include <System.Core/hcore.h>
+#include <System.Core/Heap.hxx>
+#include <System.Core/System.Core.hxx>
using namespace HCore;
using namespace System;
diff --git a/Public/Kits/System.Core/HeapAPI.hxx b/Public/Kits/System.Core/Heap.hxx
index f50ff6f7..292a1227 100644
--- a/Public/Kits/System.Core/HeapAPI.hxx
+++ b/Public/Kits/System.Core/Heap.hxx
@@ -6,17 +6,13 @@
#pragma once
+#include <System.Core/Defs.hxx>
#include <CompilerKit/CompilerKit.hxx>
-#include <NewKit/Defines.hpp>
-
-/// @brief SOM class, translated to C++
-
-using namespace HCore;
namespace System {
class MemoryException;
-typedef VoidPtr HeapPtr;
+typedef PVOID HeapPtr;
enum {
kHeapExpandable = 2,
@@ -58,7 +54,7 @@ class MemoryException final {
const char *Reason();
private:
- const char *mReason{"HeapAPI: Memory Exception!"};
+ const char *mReason{"System.Core: Process Heap Exception: Catastrophic failure!"};
private:
friend Heap;
diff --git a/Public/Kits/System.Core/hcore.h b/Public/Kits/System.Core/System.Core.hxx
index b368b997..b368b997 100644
--- a/Public/Kits/System.Core/hcore.h
+++ b/Public/Kits/System.Core/System.Core.hxx
diff --git a/Public/Kits/System.Core/System.hxx b/Public/Kits/System.Core/System.hxx
index 97d4bdac..37cab4a4 100644
--- a/Public/Kits/System.Core/System.hxx
+++ b/Public/Kits/System.Core/System.hxx
@@ -10,9 +10,9 @@
------------------------------------------------------- */
-#include <System.Core/CoreAPI.hxx>
-#include <System.Core/FileAPI.hxx>
-#include <System.Core/HeapAPI.hxx>
+#include <System.Core/Defs.hxx>
+#include <System.Core/File.hxx>
+#include <System.Core/Heap.hxx>
#include <System.Core/ThreadAPI.hxx>
using namespace HCore;