summaryrefslogtreecommitdiffhomepage
path: root/SCIKit
diff options
context:
space:
mode:
authorAmlal EL Mahrouss <amlalelmahrouss@icloud.com>2024-08-10 07:58:47 +0200
committerAmlal EL Mahrouss <amlalelmahrouss@icloud.com>2024-08-10 08:00:25 +0200
commit80039963ff08d1810e22a0ae41497b156e861db0 (patch)
tree32b0f12573584668e656b4869a733e31264a06ba /SCIKit
parent1c217ed09c6c4b13ec09b897270a208439f0db55 (diff)
[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 <amlalelmahrouss@icloud.com>
Diffstat (limited to 'SCIKit')
-rw-r--r--SCIKit/SCIBase.hxx19
-rw-r--r--SCIKit/build.json2
-rw-r--r--SCIKit/makefile2
-rw-r--r--SCIKit/scm.internal.inl16
4 files changed, 27 insertions, 12 deletions
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 <typename TCLS, typename UCLSID, typename... Args>
+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 <typename TCLS>
+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 <typename TCLS, typename UCLSID, typename... Args>
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 <typename TCLS>
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;