From 41117a33aa0dde66b8964b4bc0de0082fcd40667 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Wed, 18 Feb 2026 15:39:53 +0100 Subject: chore: libDDK: Tweak DDK and libSystem SDK. Signed-off-by: Amlal El Mahrouss --- src/libDDK/libDDK.json | 4 ++-- src/libDDK/src/ddk_abi_cxx.cc | 21 --------------------- src/libDDK/src/ddk_abi_cxx.cpp | 21 +++++++++++++++++++++ src/libDDK/src/ddk_driver_base.cpp | 5 +++++ src/libDDK/src/ddk_objectkit.cc | 5 ----- src/libSystem/libSystem.json | 2 +- 6 files changed, 29 insertions(+), 29 deletions(-) delete mode 100644 src/libDDK/src/ddk_abi_cxx.cc create mode 100644 src/libDDK/src/ddk_abi_cxx.cpp create mode 100644 src/libDDK/src/ddk_driver_base.cpp delete mode 100644 src/libDDK/src/ddk_objectkit.cc (limited to 'src') diff --git a/src/libDDK/libDDK.json b/src/libDDK/libDDK.json index 24804a23..e07766b2 100644 --- a/src/libDDK/libDDK.json +++ b/src/libDDK/libDDK.json @@ -2,7 +2,7 @@ "compiler_path": "x86_64-w64-mingw32-gcc", "compiler_std": "c++20", "headers_path": ["../", "./"], - "sources_path": ["src/*.c", "src/*.cc", "src/*.S"], + "sources_path": ["src/*.c", "src/*.cpp", "src/*.S"], "output_name": "libDDK.dll", "compiler_flags": [ "-ffreestanding", @@ -20,5 +20,5 @@ "kDDKVersionLowest=0x0100", "kDDKVersion=0x0100" ], - "description": "Driver Development Kit for NeKernel." + "description": "C/C++ Driver Development Kit for the NeKernel stack." } diff --git a/src/libDDK/src/ddk_abi_cxx.cc b/src/libDDK/src/ddk_abi_cxx.cc deleted file mode 100644 index a6232a89..00000000 --- a/src/libDDK/src/ddk_abi_cxx.cc +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2024-2025, Amlal El Mahrouss (amlal@nekernel.org) -// Licensed under the Apache License, Version 2.0 (see LICENSE file) -// Official repository: https://github.com/nekernel-org/nekernel - -#include - -void* operator new(size_t sz) { - return ::kalloc(sz); -} - -void operator delete(void* ptr) { - ::kfree(ptr); -} - -void* operator new[](size_t sz) { - return ::kalloc(sz); -} - -void operator delete[](void* ptr) { - ::kfree(ptr); -} diff --git a/src/libDDK/src/ddk_abi_cxx.cpp b/src/libDDK/src/ddk_abi_cxx.cpp new file mode 100644 index 00000000..a6232a89 --- /dev/null +++ b/src/libDDK/src/ddk_abi_cxx.cpp @@ -0,0 +1,21 @@ +// Copyright 2024-2025, Amlal El Mahrouss (amlal@nekernel.org) +// Licensed under the Apache License, Version 2.0 (see LICENSE file) +// Official repository: https://github.com/nekernel-org/nekernel + +#include + +void* operator new(size_t sz) { + return ::kalloc(sz); +} + +void operator delete(void* ptr) { + ::kfree(ptr); +} + +void* operator new[](size_t sz) { + return ::kalloc(sz); +} + +void operator delete[](void* ptr) { + ::kfree(ptr); +} diff --git a/src/libDDK/src/ddk_driver_base.cpp b/src/libDDK/src/ddk_driver_base.cpp new file mode 100644 index 00000000..5aad76d2 --- /dev/null +++ b/src/libDDK/src/ddk_driver_base.cpp @@ -0,0 +1,5 @@ +// Copyright 2024-2026, Amlal El Mahrouss (amlal@nekernel.org) +// Licensed under the Apache License, Version 2.0 (see LICENSE file) +// Official repository: https://github.com/nekernel-org/nekernel + +#include diff --git a/src/libDDK/src/ddk_objectkit.cc b/src/libDDK/src/ddk_objectkit.cc deleted file mode 100644 index 5aad76d2..00000000 --- a/src/libDDK/src/ddk_objectkit.cc +++ /dev/null @@ -1,5 +0,0 @@ -// Copyright 2024-2026, Amlal El Mahrouss (amlal@nekernel.org) -// Licensed under the Apache License, Version 2.0 (see LICENSE file) -// Official repository: https://github.com/nekernel-org/nekernel - -#include diff --git a/src/libSystem/libSystem.json b/src/libSystem/libSystem.json index a90084cc..6faaa695 100644 --- a/src/libSystem/libSystem.json +++ b/src/libSystem/libSystem.json @@ -17,5 +17,5 @@ "kLibSystemVersionHighest=0x0100", "kLibSystemVersionLowest=0x0100" ], - "description": "System Kit for NeKernel." + "description": "The System Call Kit for the NeKernel Stack." } -- cgit v1.2.3