summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-03-10 09:29:31 +0100
committerAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-03-10 09:29:31 +0100
commita22ddb45201f40e41902b4c189c31c6418742c8a (patch)
treea1622d6199608c40c5aee56390ef24fe817ec4f9
parent028d7057402051f809bbafa27aa278769732c56b (diff)
Very important changes.
- Update user land dlls output name. - Define process team methods in ProcessTeam.cxx. - Add rt_std in HALKit\AMD64. - Breaking changes in System.Graphics.dll: Replace all header files extensions starting with .hpp to .hxx. - Makefile don't rely on winasm anymore. Signed-off-by: Amlal El Mahrouss <amlal@el-mahrouss-logic.com>
-rw-r--r--Private/HALKit/AMD64/HalProcessor.cpp2
-rw-r--r--Private/HALKit/AMD64/Processor.hpp1
-rw-r--r--Private/KernelKit/ProcessManager.hpp4
-rw-r--r--Private/ObjectKit/Object.hxx20
-rw-r--r--Private/Source/ProcessTeam.cxx7
-rw-r--r--Private/makefile2
-rw-r--r--Public/Kits/GKit/Core.hxx6
-rw-r--r--Public/Kits/GKit/Dim2d.cxx2
-rw-r--r--Public/Kits/GKit/Dim2d.hxx (renamed from Public/Kits/GKit/Dim2d.hpp)9
-rw-r--r--Public/Kits/GKit/Frame.cxx4
-rw-r--r--Public/Kits/GKit/Frame.hxx2
-rw-r--r--Public/Kits/GKit/Makefile4
-rw-r--r--Public/Kits/GKit/Stylesheet.hxx2
-rw-r--r--Public/Kits/ZipKit/Makefile4
-rw-r--r--SPECIFICATION.TXT12
15 files changed, 56 insertions, 25 deletions
diff --git a/Private/HALKit/AMD64/HalProcessor.cpp b/Private/HALKit/AMD64/HalProcessor.cpp
index 0c246a9d..9596a82b 100644
--- a/Private/HALKit/AMD64/HalProcessor.cpp
+++ b/Private/HALKit/AMD64/HalProcessor.cpp
@@ -52,4 +52,6 @@ void rt_cli() { asm volatile("cli"); }
void rt_sti() { asm volatile("sti"); }
void rt_cld() { asm volatile("cld"); }
+
+void rt_std() { asm volatile("std"); }
} // namespace HCore::HAL
diff --git a/Private/HALKit/AMD64/Processor.hpp b/Private/HALKit/AMD64/Processor.hpp
index e94d055f..02951540 100644
--- a/Private/HALKit/AMD64/Processor.hpp
+++ b/Private/HALKit/AMD64/Processor.hpp
@@ -60,6 +60,7 @@ EXTERN_C void rt_halt();
EXTERN_C void rt_cli();
EXTERN_C void rt_sti();
EXTERN_C void rt_cld();
+EXTERN_C void rt_std();
struct PACKED Register64 final {
UShort Limit;
diff --git a/Private/KernelKit/ProcessManager.hpp b/Private/KernelKit/ProcessManager.hpp
index 0eb3f80e..c7c69093 100644
--- a/Private/KernelKit/ProcessManager.hpp
+++ b/Private/KernelKit/ProcessManager.hpp
@@ -193,8 +193,8 @@ public:
HCORE_COPY_DEFAULT(ProcessTeam);
- MutableArray<Ref<Process>>& AsArray() { return mProcessList; }
- Ref<Process>& AsRef() { return mCurrentProcess; }
+ MutableArray<Ref<Process>>& AsArray();
+ Ref<Process>& AsRef();
public:
MutableArray<Ref<Process>> mProcessList;
diff --git a/Private/ObjectKit/Object.hxx b/Private/ObjectKit/Object.hxx
new file mode 100644
index 00000000..1cb9e084
--- /dev/null
+++ b/Private/ObjectKit/Object.hxx
@@ -0,0 +1,20 @@
+/* -------------------------------------------
+
+ Copyright Mahrouss Logic
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Defines.hpp>
+
+namespace HCore {
+/// \brief Object Manager handle.
+typedef struct Object {
+ Void(*Release)(Void);
+ Void(*Invoke)(Void);
+ Void(*QueryInterface)(Void);
+} Ojbect, *ObjectPtr;
+} // namespace HCore
+
+#define object_cast reinterpret_cast
diff --git a/Private/Source/ProcessTeam.cxx b/Private/Source/ProcessTeam.cxx
index d7979cf3..569d417d 100644
--- a/Private/Source/ProcessTeam.cxx
+++ b/Private/Source/ProcessTeam.cxx
@@ -9,8 +9,11 @@
/// @brief Process Team API.
/***********************************************************************************/
-#include <KernelKit/ProcessManager.hpp>
-#include <KernelKit/SMPManager.hpp>
#include <KernelKit/ProcessTeam.hpp>
+namespace HCore {
+MutableArray<Ref<Process>>& ProcessTeam::AsArray() { return mProcessList; }
+Ref<Process>& ProcessTeam::AsRef() { return mCurrentProcess; }
+} // namespace HCore
+
// last rev 05-03-24
diff --git a/Private/makefile b/Private/makefile
index 9b5d1595..5267bc9c 100644
--- a/Private/makefile
+++ b/Private/makefile
@@ -13,7 +13,7 @@ ifeq ($(UNAME), Darwin)
ASM = nasm
else
# Otherwise Windows NT.
-ASM = $(WINASM)
+ASM = nasm.exe
endif
# Add assembler, linker, and object files variables.
diff --git a/Public/Kits/GKit/Core.hxx b/Public/Kits/GKit/Core.hxx
index 98a25f72..db9aa36f 100644
--- a/Public/Kits/GKit/Core.hxx
+++ b/Public/Kits/GKit/Core.hxx
@@ -22,10 +22,10 @@
#define $() HCore::GApplication::Shared()->Document()
-#ifdef __EXPORT_LIB
-#define G_API __attribute__((pef_container(".EXPORT")))
-#else
+#ifdef __IMPORT_LIB
#define G_API __attribute__((pef_container(".IMPORT")))
+#else
+#define G_API __attribute__((pef_container(".EXPORT")))
#endif // ifdef __EXPORT_LIB
namespace HCore {
diff --git a/Public/Kits/GKit/Dim2d.cxx b/Public/Kits/GKit/Dim2d.cxx
index 9d791ba2..a7df5cef 100644
--- a/Public/Kits/GKit/Dim2d.cxx
+++ b/Public/Kits/GKit/Dim2d.cxx
@@ -11,7 +11,7 @@
------------------------------------------- */
-#include <GKit/Dim2d.hpp>
+#include <GKit/Dim2d.hxx>
namespace HCore {
HCore::UInt& Dim2d::X() { return m_X; }
diff --git a/Public/Kits/GKit/Dim2d.hpp b/Public/Kits/GKit/Dim2d.hxx
index 23d1e100..0e6c1519 100644
--- a/Public/Kits/GKit/Dim2d.hpp
+++ b/Public/Kits/GKit/Dim2d.hxx
@@ -8,16 +8,17 @@
Revision History:
31/01/24: Added file (amlel)
+ 3/10/24: Remname extension to .hxx
------------------------------------------- */
-#ifndef __GORG__DIM2D_HPP__
-#define __GORG__DIM2D_HPP__
+#ifndef __DIM2D__
+#define __DIM2D__
#include <GKit/Core.hxx>
namespace HCore {
-class Dim2d final {
+class G_API Dim2d final {
public:
explicit Dim2d() = delete;
explicit Dim2d(const HCore::UInt& x, const HCore::UInt& y) : m_X(x), m_Y(y) {}
@@ -34,4 +35,4 @@ class Dim2d final {
};
} // namespace HCore
-#endif /* ifndef __GORG__DIM2D_HPP__ */
+#endif /* ifndef __DIM2D__ */
diff --git a/Public/Kits/GKit/Frame.cxx b/Public/Kits/GKit/Frame.cxx
index c1f1df2c..ee2d3a3f 100644
--- a/Public/Kits/GKit/Frame.cxx
+++ b/Public/Kits/GKit/Frame.cxx
@@ -13,4 +13,6 @@
#include <GKit/Frame.hxx>
-namespace HCore {}
+namespace HCore {
+
+} // namespace HCore
diff --git a/Public/Kits/GKit/Frame.hxx b/Public/Kits/GKit/Frame.hxx
index efa46fa3..1d87c41a 100644
--- a/Public/Kits/GKit/Frame.hxx
+++ b/Public/Kits/GKit/Frame.hxx
@@ -14,7 +14,7 @@
#pragma once
#include <GKit/Core.hxx>
-#include <GKit/Dim2d.hpp>
+#include <GKit/Dim2d.hxx>
#include <NewKit/MutableArray.hpp>
namespace HCore {
diff --git a/Public/Kits/GKit/Makefile b/Public/Kits/GKit/Makefile
index 2873f91b..b8c8949d 100644
--- a/Public/Kits/GKit/Makefile
+++ b/Public/Kits/GKit/Makefile
@@ -5,7 +5,7 @@
CC=x86_64-w64-mingw32-g++
CCFLAGS=-shared -ffreestanding -fno-rtti -fno-exceptions -std=c++20
-OUTPUT=GKit.dll
+OUTPUT=System.Graphics.dll
.PHONY: build-gkit
build-gkit:
@@ -13,7 +13,7 @@ build-gkit:
.PHONY: all
all: build-gkit
- @echo "[GKit] done."
+ @echo "[System.Graphics.dll] Build done."
.PHONY: clean
clean:
diff --git a/Public/Kits/GKit/Stylesheet.hxx b/Public/Kits/GKit/Stylesheet.hxx
index 55291f73..d9c88660 100644
--- a/Public/Kits/GKit/Stylesheet.hxx
+++ b/Public/Kits/GKit/Stylesheet.hxx
@@ -16,7 +16,7 @@
/// TODO: Stylesheets for GUI.
#include <GKit/Core.hxx>
-#include <GKit/Dim2d.hpp>
+#include <GKit/Dim2d.hxx>
#include <NewKit/MutableArray.hpp>
namespace HCore {
diff --git a/Public/Kits/ZipKit/Makefile b/Public/Kits/ZipKit/Makefile
index e055d993..f27eb6ce 100644
--- a/Public/Kits/ZipKit/Makefile
+++ b/Public/Kits/ZipKit/Makefile
@@ -7,7 +7,7 @@ CC=x86_64-w64-mingw32-g++
CCFLAGS=-shared -ffreestanding -fno-rtti -fno-exceptions -std=c++20
ASM=nasm
ASMFLAGS=-f elf64
-OUTPUT=ZipKit.dll
+OUTPUT=System.Zip.dll
.PHONY: build-zipkit
build-zipkit:
@@ -15,7 +15,7 @@ build-zipkit:
.PHONY: all
all: build-zipkit
- @echo "Done."
+ @echo "[System.Zip.dll] Done."
.PHONY: clean
clean:
diff --git a/SPECIFICATION.TXT b/SPECIFICATION.TXT
index 2b62521b..c2e30c6c 100644
--- a/SPECIFICATION.TXT
+++ b/SPECIFICATION.TXT
@@ -17,10 +17,12 @@
- Hardware Abstraction Layer.
- Native Filesystem support (NewFS).
- Program Loader.
-- TLS.
+- Thread Local Storage.
+- Semaphore, Locks, Timers.
- Canary bird.
- Dynamic Libraries.
-- Cross platform code (it has to work for each platform)
+- Cross Platform.
+- Permission Selectors.
===================================
2: The Filesystem
@@ -32,9 +34,9 @@
- UNIX path style.
==================================
-3: The Executives
-===================================
+3: Common naming conventions:
+==================================
- Kernel -> ke_init_x
- RunTime -> rt_copy_mem
-- Hal -> HalFooBar \ No newline at end of file
+- Hal -> hal_foo_bar \ No newline at end of file