summaryrefslogtreecommitdiffhomepage
path: root/Public/Kits/SystemKit
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-01-31 12:41:06 +0100
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-01-31 12:41:06 +0100
commitf7edf08d067b4c52c3183e8ad0467293e54075e8 (patch)
tree0e2894d78684966993ff2bed2df4d6c5e12aef87 /Public/Kits/SystemKit
parentfc55f0d69d24fb4908cbd811681f2c3fac53614d (diff)
Add BUG_LIST.TXT, kernel improvements and Public kits improvements.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Public/Kits/SystemKit')
-rw-r--r--Public/Kits/SystemKit/CoreAPI.hxx9
-rw-r--r--Public/Kits/SystemKit/FileAPI.hxx8
-rw-r--r--Public/Kits/SystemKit/HeapAPI.hxx2
-rw-r--r--Public/Kits/SystemKit/SystemCall.hxx2
-rw-r--r--Public/Kits/SystemKit/ThreadAPI.hxx10
-rw-r--r--Public/Kits/SystemKit/compile_flags.txt4
6 files changed, 25 insertions, 10 deletions
diff --git a/Public/Kits/SystemKit/CoreAPI.hxx b/Public/Kits/SystemKit/CoreAPI.hxx
index f3e67e96..fa5e8eef 100644
--- a/Public/Kits/SystemKit/CoreAPI.hxx
+++ b/Public/Kits/SystemKit/CoreAPI.hxx
@@ -9,9 +9,18 @@
#pragma once
+#ifndef __cplusplus
+#error This API is meant to be used with C++
+#endif
+
#ifdef MUST_PASS
#undef MUST_PASS
#endif
// unused by user side, it's a kernel thing.
#define MUST_PASS(e) ((void)e)
+
+#define EXTERN_C extern "C"
+
+#define STDCALL __attribute__((stdcall))
+#define CDECL __attribute__((cdecl))
diff --git a/Public/Kits/SystemKit/FileAPI.hxx b/Public/Kits/SystemKit/FileAPI.hxx
index c55d26ff..350e27f4 100644
--- a/Public/Kits/SystemKit/FileAPI.hxx
+++ b/Public/Kits/SystemKit/FileAPI.hxx
@@ -24,11 +24,11 @@ class HFile final {
HCORE_COPY_DEFAULT(HFile);
public:
- void *Read(SizeT off, SizeT sz);
- void Write(void *buf, SizeT off, SizeT sz);
+ voidPtr Read(SizeT off, SizeT sz);
+ void Write(voidPtr buf, SizeT off, SizeT sz);
void Seek(SizeT off);
- void *Read(SizeT sz);
- void Write(void *buf, SizeT sz);
+ voidPtr Read(SizeT sz);
+ void Write(voidPtr buf, SizeT sz);
void Rewind();
public:
diff --git a/Public/Kits/SystemKit/HeapAPI.hxx b/Public/Kits/SystemKit/HeapAPI.hxx
index 11d4c265..c11b1408 100644
--- a/Public/Kits/SystemKit/HeapAPI.hxx
+++ b/Public/Kits/SystemKit/HeapAPI.hxx
@@ -41,7 +41,7 @@ class HHeap final {
public:
void Delete(HHeapPtr me) noexcept;
- SizeT Tell(HHeapPtr me) noexcept;
+ SizeT Size(HHeapPtr me) noexcept;
HHeapPtr New(const SizeT &sz, const Int32 flags = kHeapNoFlags);
};
diff --git a/Public/Kits/SystemKit/SystemCall.hxx b/Public/Kits/SystemKit/SystemCall.hxx
index 77614099..64d65d4b 100644
--- a/Public/Kits/SystemKit/SystemCall.hxx
+++ b/Public/Kits/SystemKit/SystemCall.hxx
@@ -14,3 +14,5 @@
#pragma once
/// @brief System Call Interface
+
+#include <SystemKit/CoreAPI.hxx>
diff --git a/Public/Kits/SystemKit/ThreadAPI.hxx b/Public/Kits/SystemKit/ThreadAPI.hxx
index a9490033..80742ab9 100644
--- a/Public/Kits/SystemKit/ThreadAPI.hxx
+++ b/Public/Kits/SystemKit/ThreadAPI.hxx
@@ -20,11 +20,11 @@ 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 NAME[255]; // Module Name
- const UIntPtr START_ADDRESS; // Start Address
- const UIntPtr START_ALLOC; // Allocation Heap
- const UIntPtr START_STACK; // Stack Pointer.
- const Int32 ARCH; // Architecture and/or platform.
+ const Char Name[255]; // Module Name
+ const UIntPtr StartAddress; // Start Address
+ const UIntPtr StartHeap; // Allocation Heap
+ const UIntPtr StartStack; // Stack Pointer.
+ const Int32 ARCH; // Architecture and/or platform.
};
enum {
diff --git a/Public/Kits/SystemKit/compile_flags.txt b/Public/Kits/SystemKit/compile_flags.txt
new file mode 100644
index 00000000..6e721e73
--- /dev/null
+++ b/Public/Kits/SystemKit/compile_flags.txt
@@ -0,0 +1,4 @@
+-I./
+-I../
+-I../../../Private
+-std=c++20