diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-11-17 10:05:07 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-17 10:05:07 +0100 |
| commit | 062c4bb508bf6ec7334d374fef2e0e10623b2df9 (patch) | |
| tree | 137a91eb22d1a9207fd4322ced08c3b6388c5eb5 /dev/libSystem | |
| parent | 36269e57831e560df6a0da9c9d02c00671b0163d (diff) | |
| parent | 791fcd646503f05617f22e6006c115095746da26 (diff) | |
Merge pull request #69 from nekernel-org/dev
release: NeKernel v0.0.7
Diffstat (limited to 'dev/libSystem')
| -rw-r--r-- | dev/libSystem/SystemKit/Err.h | 2 | ||||
| -rw-r--r-- | dev/libSystem/SystemKit/Jail.h | 2 | ||||
| -rw-r--r-- | dev/libSystem/SystemKit/Macros.h | 2 | ||||
| -rw-r--r-- | dev/libSystem/SystemKit/Syscall.h | 2 | ||||
| -rw-r--r-- | dev/libSystem/SystemKit/System.h | 2 | ||||
| -rw-r--r-- | dev/libSystem/SystemKit/Verify.h | 2 | ||||
| -rw-r--r-- | dev/libSystem/src/JailCalls.cc | 2 | ||||
| -rw-r--r-- | dev/libSystem/src/Makefile | 2 | ||||
| -rw-r--r-- | dev/libSystem/src/SystemCalls.cc | 19 | ||||
| -rw-r--r-- | dev/libSystem/src/SystemCallsABI+AMD64.asm | 2 | ||||
| -rw-r--r-- | dev/libSystem/src/Utils.cc | 29 | ||||
| -rw-r--r-- | dev/libSystem/src/VerifyCalls.cc | 2 |
12 files changed, 40 insertions, 28 deletions
diff --git a/dev/libSystem/SystemKit/Err.h b/dev/libSystem/SystemKit/Err.h index c0a2282b..5274d78c 100644 --- a/dev/libSystem/SystemKit/Err.h +++ b/dev/libSystem/SystemKit/Err.h @@ -1,6 +1,6 @@ /* ------------------------------------------- - Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved. + Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license. ------------------------------------------- */ diff --git a/dev/libSystem/SystemKit/Jail.h b/dev/libSystem/SystemKit/Jail.h index c23942c5..e033c25f 100644 --- a/dev/libSystem/SystemKit/Jail.h +++ b/dev/libSystem/SystemKit/Jail.h @@ -1,6 +1,6 @@ /* ------------------------------------------- - Copyright (C) 2025, Amlal El Mahrouss, all rights reserved. + Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license. ------------------------------------------- */ diff --git a/dev/libSystem/SystemKit/Macros.h b/dev/libSystem/SystemKit/Macros.h index 2bdeff9d..f8eac16a 100644 --- a/dev/libSystem/SystemKit/Macros.h +++ b/dev/libSystem/SystemKit/Macros.h @@ -1,6 +1,6 @@ /* ------------------------------------------- -Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved. +Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license. File: Macros.h Purpose: libsci Macros header. diff --git a/dev/libSystem/SystemKit/Syscall.h b/dev/libSystem/SystemKit/Syscall.h index 35bfc6f8..45da1ba5 100644 --- a/dev/libSystem/SystemKit/Syscall.h +++ b/dev/libSystem/SystemKit/Syscall.h @@ -1,6 +1,6 @@ /* ------------------------------------------- - Copyright (C) 2025, Amlal El Mahrouss, all rights reserved. + Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license. ------------------------------------------- */ diff --git a/dev/libSystem/SystemKit/System.h b/dev/libSystem/SystemKit/System.h index 88472513..807c543c 100644 --- a/dev/libSystem/SystemKit/System.h +++ b/dev/libSystem/SystemKit/System.h @@ -1,6 +1,6 @@ /* -------------------------------------------
-Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
File: System.h
Purpose: System Call Interface.
diff --git a/dev/libSystem/SystemKit/Verify.h b/dev/libSystem/SystemKit/Verify.h index bc0c8be3..7130847e 100644 --- a/dev/libSystem/SystemKit/Verify.h +++ b/dev/libSystem/SystemKit/Verify.h @@ -1,6 +1,6 @@ /* ------------------------------------------- - Copyright (C) 2025, Amlal El Mahrouss, all rights reserved. + Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license. File: Verify.h Purpose: System Call Interface Verification Layer. diff --git a/dev/libSystem/src/JailCalls.cc b/dev/libSystem/src/JailCalls.cc index 5cb47bb5..71fe2e93 100644 --- a/dev/libSystem/src/JailCalls.cc +++ b/dev/libSystem/src/JailCalls.cc @@ -1,6 +1,6 @@ /* ------------------------------------------- - Copyright (C) 2025, Amlal El Mahrouss, all rights reserved. + Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license. ------------------------------------------- */ diff --git a/dev/libSystem/src/Makefile b/dev/libSystem/src/Makefile index ea8e9905..622223b4 100644 --- a/dev/libSystem/src/Makefile +++ b/dev/libSystem/src/Makefile @@ -1,5 +1,5 @@ ################################################## -# (c) Amlal El Mahrouss and NeKernel contributors, all rights reserved. +# (c) Amlal El Mahrouss and NeKernel contributors, licensed under the Apache 2.0 license. # This file is for libSystem.dll's syscall stubs. ################################################## diff --git a/dev/libSystem/src/SystemCalls.cc b/dev/libSystem/src/SystemCalls.cc index 3db9368d..07c86ff9 100644 --- a/dev/libSystem/src/SystemCalls.cc +++ b/dev/libSystem/src/SystemCalls.cc @@ -1,6 +1,6 @@ /* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
@@ -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/SystemCallsABI+AMD64.asm b/dev/libSystem/src/SystemCallsABI+AMD64.asm index da19f41f..dd8fc9e8 100644 --- a/dev/libSystem/src/SystemCallsABI+AMD64.asm +++ b/dev/libSystem/src/SystemCallsABI+AMD64.asm @@ -2,7 +2,7 @@ ;; * ======================================================== ;; * ;; * libSystem/src/SystemCallsABI+AMD64.asm -;; * Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved. +;; * Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license. ;; * ;; * ======================================================== ;; */ diff --git a/dev/libSystem/src/Utils.cc b/dev/libSystem/src/Utils.cc new file mode 100644 index 00000000..cf4f41e7 --- /dev/null +++ b/dev/libSystem/src/Utils.cc @@ -0,0 +1,29 @@ +/* ------------------------------------------- + + Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license. + +------------------------------------------- */ + +#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/dev/libSystem/src/VerifyCalls.cc b/dev/libSystem/src/VerifyCalls.cc index 078f921b..0beb760b 100644 --- a/dev/libSystem/src/VerifyCalls.cc +++ b/dev/libSystem/src/VerifyCalls.cc @@ -1,6 +1,6 @@ /* ------------------------------------------- - Copyright (C) 2025, Amlal El Mahrouss, all rights reserved. + Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license. ------------------------------------------- */ |
