From 80039963ff08d1810e22a0ae41497b156e861db0 Mon Sep 17 00:00:00 2001 From: Amlal EL Mahrouss Date: Sat, 10 Aug 2024 07:58:47 +0200 Subject: [META] Important refactors and fixes. + FIX SCIBase.hxx header and inline scm.internal.inl header. + Rename targets libSCI, libDDK to sci.dll and ddk.dll. + Don't initialize again the values of heap and such in HalKernelMain.cxx + Add 'STOP code' in ke_stop call. + Updated ReadMe.md. Signed-off-by: Amlal EL Mahrouss --- SCIKit/SCIBase.hxx | 19 +++++++++++++++++-- SCIKit/build.json | 2 +- SCIKit/makefile | 2 +- SCIKit/scm.internal.inl | 16 ++++++++-------- 4 files changed, 27 insertions(+), 12 deletions(-) (limited to 'SCIKit') diff --git a/SCIKit/SCIBase.hxx b/SCIKit/SCIBase.hxx index c2241715..88711f7c 100644 --- a/SCIKit/SCIBase.hxx +++ b/SCIKit/SCIBase.hxx @@ -73,7 +73,7 @@ class EventListenerInterface final : public ClsID { public: explicit EventListenerInterface() = default; - virtual ~UnknownInterface() = default; + virtual ~EventListenerInterface() = default; EventListenerInterface& operator=(const EventListenerInterface&) = default; EventListenerInterface(const EventListenerInterface&) = default; @@ -127,4 +127,19 @@ enum eFBGPU, eFBCPU, eFBInvalid, -}; \ No newline at end of file +}; + +/// @brief Allocate new SCM object. +/// @tparam TCLS the class type. +/// @tparam UCLSID UCLS factory class type. +/// @param uclsidOfCls UCLS factory class +/// @return TCLS interface +template +inline TCLS* ScmQueryInterface(UCLSID* uclsidOfCls, Args&&... args); + +/// @brief Release SCM object. +/// @tparam TCLS the class type. +/// @param cls the class to release. +/// @return status code. +template +inline SInt32 ScmReleaseClass(TCLS* cls); \ No newline at end of file diff --git a/SCIKit/build.json b/SCIKit/build.json index 770d1622..ecd8593d 100644 --- a/SCIKit/build.json +++ b/SCIKit/build.json @@ -3,7 +3,7 @@ "compiler_std": "c++20", "headers_path": ["../"], "sources_path": ["*.cxx"], - "output_name": "libSCI.dll", + "output_name": "sci.dll", "compiler_flags": ["-fPIC", "-shared", "-std=c++20"], "cpp_macros": ["__NEWOS_SYMS__"] } diff --git a/SCIKit/makefile b/SCIKit/makefile index 7757440e..63753422 100644 --- a/SCIKit/makefile +++ b/SCIKit/makefile @@ -5,7 +5,7 @@ CC=g++ FLAGS=-I../ -shared -fPIC -D__NEWOS_SYMS__ -OUTPUT=libSCI.dll +OUTPUT=sci.dll .PHONY: build-sci build-sci: diff --git a/SCIKit/scm.internal.inl b/SCIKit/scm.internal.inl index 6b3af973..e9c969f1 100644 --- a/SCIKit/scm.internal.inl +++ b/SCIKit/scm.internal.inl @@ -40,10 +40,10 @@ public: }; /// @brief Allocate new SCM object. -/// @tparam TCLS -/// @tparam UCLSID -/// @param uclsidOfCls -/// @return +/// @tparam TCLS the class type. +/// @tparam UCLSID UCLS factory class type. +/// @param uclsidOfCls UCLS factory class +/// @return TCLS interface template inline TCLS* ScmQueryInterface(UCLSID* uclsidOfCls, Args&&... args) { @@ -51,9 +51,9 @@ inline TCLS* ScmQueryInterface(UCLSID* uclsidOfCls, Args&&... args) } /// @brief Release SCM object. -/// @tparam TCLS -/// @param cls -/// @return +/// @tparam TCLS the class type. +/// @param cls the class to release. +/// @return status code. template inline SInt32 ScmReleaseClass(TCLS* cls) { @@ -71,7 +71,7 @@ protocol EventListenerInterface final : public ClsID { public: explicit EventListenerInterface() = default; - virtual ~UnknownInterface() = default; + virtual ~EventListenerInterface() = default; EventListenerInterface& operator=(const EventListenerInterface&) = default; EventListenerInterface(const EventListenerInterface&) = default; -- cgit v1.2.3