summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAmlal EL Mahrouss <amlalelmahrouss@icloud.com>2024-08-14 09:54:52 +0200
committerAmlal EL Mahrouss <amlalelmahrouss@icloud.com>2024-08-14 09:54:52 +0200
commit39e1aded9faa6a20d2afb89244766b87571b89a1 (patch)
tree370aa178e9bf1b79cd0b189f978aa7b4eac5d5d9
parente2188feb99af7d537288f9e9c266b7d89ac6e736 (diff)
[META] BUMP, SEE BELOW.
+ Bumping sources. + Still doing R&D on SMP. Signed-off-by: Amlal EL Mahrouss <amlalelmahrouss@icloud.com>
-rw-r--r--CRTKit/README.md5
-rw-r--r--CRTKit/ReadMe.md5
-rw-r--r--CRTKit/__mpcc_runtime.cxx12
-rw-r--r--CRTKit/__ndk_alloca.hxx (renamed from CRTKit/__mpcc_alloca.hxx)2
-rw-r--r--CRTKit/__ndk_defines.hxx (renamed from CRTKit/__mpcc_defines.hxx)10
-rw-r--r--CRTKit/__ndk_exception.hxx (renamed from CRTKit/__mpcc_exception.hxx)2
-rw-r--r--CRTKit/__ndk_new_delete.hxx (renamed from CRTKit/__mpcc_malloc.hxx)38
-rw-r--r--CRTKit/__ndk_runtime.cxx11
-rw-r--r--Kernel/NewKit/Defines.hxx2
-rw-r--r--SCIKit/SCIBase.hxx19
-rw-r--r--Srv/.keepme (renamed from Startup/.keepme)0
-rw-r--r--Srv/OSHS/Start.cxx (renamed from Startup/OSHS/Start.cxx)0
-rw-r--r--Srv/ReadMe.md3
13 files changed, 79 insertions, 30 deletions
diff --git a/CRTKit/README.md b/CRTKit/README.md
deleted file mode 100644
index c7058527..00000000
--- a/CRTKit/README.md
+++ /dev/null
@@ -1,5 +0,0 @@
-# ZKA C++ RunTime
-
-This is the public interface of ZKA' RT, please check libNDK.dll instead.
-
-###### (c) ZKA Technologies, all rights reserved. \ No newline at end of file
diff --git a/CRTKit/ReadMe.md b/CRTKit/ReadMe.md
new file mode 100644
index 00000000..25dc2cb2
--- /dev/null
+++ b/CRTKit/ReadMe.md
@@ -0,0 +1,5 @@
+# ZKA C++ RunTime
+
+This is the public interface of ZKA' NDK RunTime, please check ndk.dll instead.
+
+###### (c) ZKA Technologies, all rights reserved. \ No newline at end of file
diff --git a/CRTKit/__mpcc_runtime.cxx b/CRTKit/__mpcc_runtime.cxx
deleted file mode 100644
index 639b2ca2..00000000
--- a/CRTKit/__mpcc_runtime.cxx
+++ /dev/null
@@ -1,12 +0,0 @@
-/* -------------------------------------------
-
- Copyright ZKA Technologies
-
-------------------------------------------- */
-
-#include <CRTKit/__mpcc_alloca.hxx>
-#include <CRTKit/__mpcc_defines.hxx>
-#include <CRTKit/__mpcc_malloc.hxx>
-#include <CRTKit/__mpcc_exception.hxx>
-
-/// @note No sources needed for now. \ No newline at end of file
diff --git a/CRTKit/__mpcc_alloca.hxx b/CRTKit/__ndk_alloca.hxx
index cc123ac5..126beadd 100644
--- a/CRTKit/__mpcc_alloca.hxx
+++ b/CRTKit/__ndk_alloca.hxx
@@ -9,7 +9,7 @@
typedef void* ptr_type;
typedef __SIZE_TYPE__ size_type;
-inline void* __mpcc_alloca(size_type sz)
+inline void* __ndk_alloca(size_type sz)
{
return __builtin_alloca(sz);
}
diff --git a/CRTKit/__mpcc_defines.hxx b/CRTKit/__ndk_defines.hxx
index 3047ef2b..db9d3fe5 100644
--- a/CRTKit/__mpcc_defines.hxx
+++ b/CRTKit/__ndk_defines.hxx
@@ -28,11 +28,11 @@ typedef char* caddr_t;
#endif // !null
#ifdef __GNUC__
-#include <CRT/__mpcc_alloca.hxx>
-#define __mpcc_alloca(sz) __mpcc_alloca(sz)
+#include <CRT/__ndk_alloca.hxx>
+#define __ndk_alloca(sz) __ndk_alloca(sz)
#elif defined(__NDK__)
-#define __alloca(sz) __mpcc_alloca(sz)
+#define __alloca(sz) __ndk_alloca(sz)
#endif
#define __deref(ptr) (*(ptr))
@@ -90,8 +90,8 @@ typedef union double_cast {
#ifdef __STD_CXX__
-#include <CRT/__mpcc_exception.hxx>
-#include <CRT/__mpcc_malloc.hxx>
+#include <CRT/__ndk_exception.hxx>
+#include <CRT/__ndk_malloc.hxx>
#endif // ifdef __STD_CXX__
diff --git a/CRTKit/__mpcc_exception.hxx b/CRTKit/__ndk_exception.hxx
index e9e98996..14340304 100644
--- a/CRTKit/__mpcc_exception.hxx
+++ b/CRTKit/__ndk_exception.hxx
@@ -6,7 +6,7 @@
#pragma once
-#include <CRTKit/__mpcc_defines.hxx>
+#include <CRTKit/__ndk_defines.hxx>
/// @brief CRT exit, with exit code (!!! exits all threads. !!!)
/// @param code
diff --git a/CRTKit/__mpcc_malloc.hxx b/CRTKit/__ndk_new_delete.hxx
index 794cd5b4..9edf7ef4 100644
--- a/CRTKit/__mpcc_malloc.hxx
+++ b/CRTKit/__ndk_new_delete.hxx
@@ -6,7 +6,8 @@
#pragma once
-#include <CRTKit/__mpcc_defines.hxx>
+#include <CRTKit/__ndk_defines.hxx>
+#include <SCIKit/SCIBase.hxx>
namespace stdx
{
@@ -23,8 +24,39 @@ namespace stdx
template <typename KindClass>
inline void release(KindClass ptr)
{
- if (!ptr)
- return;
delete ptr;
}
} // namespace stdx
+
+void* operator new(size_type len)
+{
+ if (!len)
+ ++len;
+
+ return RtlCreateHeap(len, 0);
+}
+
+void operator delete(void* ptr)
+{
+ if (!ptr)
+ return;
+
+
+ RtlDestroyHeap(ptr);
+}
+
+void* operator new[](size_type len)
+{
+ if (!len)
+ ++len;
+
+ return RtlCreateHeap(len, 0);
+}
+
+void operator delete[](void* ptr)
+{
+ if (!ptr)
+ return;
+
+ RtlDestroyHeap(ptr);
+} \ No newline at end of file
diff --git a/CRTKit/__ndk_runtime.cxx b/CRTKit/__ndk_runtime.cxx
new file mode 100644
index 00000000..d912adc9
--- /dev/null
+++ b/CRTKit/__ndk_runtime.cxx
@@ -0,0 +1,11 @@
+/* -------------------------------------------
+
+ Copyright ZKA Technologies
+
+------------------------------------------- */
+
+#include <CRTKit/__ndk_alloca.hxx>
+#include <CRTKit/__ndk_defines.hxx>
+#include <CRTKit/__ndk_exception.hxx>
+
+/// @note No sources needed for now. \ No newline at end of file
diff --git a/Kernel/NewKit/Defines.hxx b/Kernel/NewKit/Defines.hxx
index 246adc7f..24b3526d 100644
--- a/Kernel/NewKit/Defines.hxx
+++ b/Kernel/NewKit/Defines.hxx
@@ -11,7 +11,7 @@
#define NEWKIT_VERSION "1.01"
#if !defined(_INC_NO_STDC_HEADERS) && defined(__GNUC__)
-#include <CRTKit/__mpcc_defines.hxx>
+#include <CRTKit/__ndk_defines.hxx>
#endif
#ifdef __has_feature
diff --git a/SCIKit/SCIBase.hxx b/SCIKit/SCIBase.hxx
index 8bc09afe..f6661b0b 100644
--- a/SCIKit/SCIBase.hxx
+++ b/SCIKit/SCIBase.hxx
@@ -12,7 +12,7 @@ Purpose: SCIKit foundation header.
#define IMPORT_CXX extern "C++"
#define IMPORT_C extern "C"
-#define OBJECT_PATH "\\::\\OBJDLL\\"
+#define OBJECT_PATH "::\\"
typedef bool Bool;
typedef void UInt0;
@@ -152,7 +152,22 @@ template <typename TCLS>
SInt32 ScmReleaseClass(TCLS* cls);
/// @brief Creates an SCM instance in the process.
+/// @param handle_instance the SCM handle.
+/// @param flags the SCM flags.
SInt32 ScmCreateInstance(UInt32 flags, VoidPtr* handle_instance);
/// @brief Destroys an SCM instance of the process.
-UInt0 ScmDestroyInstance(VoidPtr handle_instance); \ No newline at end of file
+/// @param handle_instance the SCM handle.
+UInt0 ScmDestroyInstance(VoidPtr handle_instance);
+
+/// @brief Creates a new heap from the process's address space.
+/// @param len the length of it.
+/// @param flags the flags of it.
+/// @return heap pointer.
+VoidPtr RtlCreateHeap(SizeT len, UInt32 flags);
+
+/// @brief Destroys the pointer
+/// @param heap the heap itself.
+/// @return void.
+UInt0 RtlDestroyHeap(VoidPtr heap);
+
diff --git a/Startup/.keepme b/Srv/.keepme
index e69de29b..e69de29b 100644
--- a/Startup/.keepme
+++ b/Srv/.keepme
diff --git a/Startup/OSHS/Start.cxx b/Srv/OSHS/Start.cxx
index 9b335020..9b335020 100644
--- a/Startup/OSHS/Start.cxx
+++ b/Srv/OSHS/Start.cxx
diff --git a/Srv/ReadMe.md b/Srv/ReadMe.md
new file mode 100644
index 00000000..65e58038
--- /dev/null
+++ b/Srv/ReadMe.md
@@ -0,0 +1,3 @@
+# New OS servers DLLs.
+
+- Used to provide a subsystem to a program.