summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--compile_flags.txt2
-rw-r--r--dev/libDDK/DriverKit/dki/contract.h2
-rw-r--r--dev/libDDK/DriverKit/macros.h8
-rw-r--r--dev/libSystem/src/SystemCalls.cc17
-rw-r--r--dev/libSystem/src/Utils.cc29
-rw-r--r--docs/STANDARD_FWRK.md5
-rw-r--r--docs/drawio/LAUNCH_DESIGN.drawio13
7 files changed, 52 insertions, 24 deletions
diff --git a/compile_flags.txt b/compile_flags.txt
index 384cd84e..c83e43d3 100644
--- a/compile_flags.txt
+++ b/compile_flags.txt
@@ -4,7 +4,7 @@
-Idev/boot
-Idev/launch
-Idev/misc
--Idev/ddk
+-Idev/libDDK
-Ipublic/tools
-Ipublic/tools/mk.app
-Ipublic/tools/mk.fwrk
diff --git a/dev/libDDK/DriverKit/dki/contract.h b/dev/libDDK/DriverKit/dki/contract.h
index 23884e02..f701de56 100644
--- a/dev/libDDK/DriverKit/dki/contract.h
+++ b/dev/libDDK/DriverKit/dki/contract.h
@@ -10,7 +10,7 @@
#pragma once
#include <CompilerKit/CompilerKit.h>
-#include <DriverKit/macros.h>
+#include <libDDK/DriverKit/macros.h>
#define DKI_CONTRACT_IMPL : public ::Kernel::DKIContract
diff --git a/dev/libDDK/DriverKit/macros.h b/dev/libDDK/DriverKit/macros.h
index 9b7b3d50..e5aa4b96 100644
--- a/dev/libDDK/DriverKit/macros.h
+++ b/dev/libDDK/DriverKit/macros.h
@@ -16,7 +16,7 @@
#define BOOL bool
#define YES true
#define NO false
-#define DDK_EXTERN extern "C" __declspec(dllexport)
+#define DDK_EXTERN extern "C"
#define nil nullptr
#undef NULL
#define NULL 0
@@ -25,7 +25,7 @@
#define BOOL char
#define YES 1
#define NO 0
-#define DDK_EXTERN extern __declspec(dllexport)
+#define DDK_EXTERN extern
#define nil ((void*) 0)
#undef NULL
#define NULL ((void*) 0)
@@ -35,9 +35,9 @@
#ifndef __DDK__
#undef DDK_EXTERN
#if defined(__cplusplus)
-#define DDK_EXTERN extern "C" __declspec(dllimport)
+#define DDK_EXTERN extern "C"
#else
-#define DDK_EXTERN __declspec(dllimport)
+#define DDK_EXTERN
#endif
#endif
diff --git a/dev/libSystem/src/SystemCalls.cc b/dev/libSystem/src/SystemCalls.cc
index 3db9368d..3d7a7447 100644
--- a/dev/libSystem/src/SystemCalls.cc
+++ b/dev/libSystem/src/SystemCalls.cc
@@ -11,23 +11,6 @@
using namespace LibSystem;
-/// @note this uses the FNV 64-bit variant.
-IMPORT_C UInt64 libsys_hash_64(const Char* path) {
- if (!path || *path == 0) return 0;
-
- const UInt64 kFNVSeed = 0xcbf29ce484222325ULL;
- const UInt64 kFNVPrime = 0x100000001b3ULL;
-
- UInt64 hash = kFNVSeed;
-
- while (*path) {
- hash ^= (Char) (*path++);
- hash *= kFNVPrime;
- }
-
- return hash;
-}
-
IMPORT_C Char* StrFmt(const Char* fmt, ...) {
if (!fmt || *fmt == 0) return const_cast<Char*>("(null)");
diff --git a/dev/libSystem/src/Utils.cc b/dev/libSystem/src/Utils.cc
new file mode 100644
index 00000000..0688cd57
--- /dev/null
+++ b/dev/libSystem/src/Utils.cc
@@ -0,0 +1,29 @@
+/* -------------------------------------------
+
+ Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <libSystem/SystemKit/Err.h>
+#include <libSystem/SystemKit/Syscall.h>
+#include <libSystem/SystemKit/System.h>
+#include <libSystem/SystemKit/Verify.h>
+
+using namespace LibSystem;
+
+/// @note This uses the FNV 64-bit variant.
+IMPORT_C UInt64 libsys_hash_64(const Char* path) {
+ if (!path || *path == 0) return 0;
+
+ const UInt64 kFNVSeed = 0xcbf29ce484222325ULL;
+ const UInt64 kFNVPrime = 0x100000001b3ULL;
+
+ UInt64 hash = kFNVSeed;
+
+ while (*path) {
+ hash ^= (Char) (*path++);
+ hash *= kFNVPrime;
+ }
+
+ return hash;
+}
diff --git a/docs/STANDARD_FWRK.md b/docs/STANDARD_FWRK.md
index 2d71b9e9..c780239a 100644
--- a/docs/STANDARD_FWRK.md
+++ b/docs/STANDARD_FWRK.md
@@ -2,4 +2,7 @@ STANDARD NEKERNEL FRAMEWORK
===========================
BRIEF
-===== \ No newline at end of file
+=====
+
+NeKernel uses a framework format to layout code/rsrc/headers altogether.
+It is essential in order to locate and avoid dyld errors. \ No newline at end of file
diff --git a/docs/drawio/LAUNCH_DESIGN.drawio b/docs/drawio/LAUNCH_DESIGN.drawio
index e69de29b..a1cfc8cc 100644
--- a/docs/drawio/LAUNCH_DESIGN.drawio
+++ b/docs/drawio/LAUNCH_DESIGN.drawio
@@ -0,0 +1,13 @@
+<mxfile host="65bd71144e">
+ <diagram id="WN9xM0SvnG1OFdIgUV1P" name="Page-1">
+ <mxGraphModel dx="1149" dy="361" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
+ <root>
+ <mxCell id="0"/>
+ <mxCell id="1" parent="0"/>
+ <mxCell id="2" value="LaunchKit" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
+ <mxGeometry x="240" y="170" width="255" height="60" as="geometry"/>
+ </mxCell>
+ </root>
+ </mxGraphModel>
+ </diagram>
+</mxfile> \ No newline at end of file