From ee64ca1014ee2bdf07bd5011f6aa9f77da104a4d Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sat, 4 Oct 2025 02:47:12 +0200 Subject: feat: kernel: new `kernel` process type, and usage of `explicit operator bool` feat: libSystem: minor tweaks. feat: indexer: important fixes in `RemoveFlag` Signed-off-by: Amlal El Mahrouss --- dev/libSystem/src/System.cc | 193 --------------------------------------- dev/libSystem/src/SystemCalls.cc | 193 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 193 insertions(+), 193 deletions(-) delete mode 100644 dev/libSystem/src/System.cc create mode 100644 dev/libSystem/src/SystemCalls.cc (limited to 'dev/libSystem/src') diff --git a/dev/libSystem/src/System.cc b/dev/libSystem/src/System.cc deleted file mode 100644 index da9931fe..00000000 --- a/dev/libSystem/src/System.cc +++ /dev/null @@ -1,193 +0,0 @@ -/* ------------------------------------------- - - Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved. - -------------------------------------------- */ - -#include -#include -#include -#include - -using namespace LibSystem; - -IMPORT_C Void _rtl_assert(Bool expr, const Char* origin) { - if (!expr) { - PrintOut(nullptr, "Assertion failed: %s\r", origin); - libsys_syscall_arg_1(SYSCALL_HASH("_rtl_debug_break")); - } -} - -/// @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("(null)"); - - return const_cast(""); -} - -// memmove-style copy -IMPORT_C VoidPtr MmCopyMemory(_Input VoidPtr dest, _Input VoidPtr src, _Input SizeT len) { - // handles overlap, prefers 64-bit word copies when aligned - if (!len || !dest || !src) return nullptr; - - auto s = static_cast(src); - auto d = static_cast(dest); - - if (d == s) return dest; - - // decide direction - if (d > s && d < s + len) { - const UInt8* rs = s + len; - UInt8* rd = d + len; - - // try 64-bit aligned backward copy - if (len >= sizeof(UInt64) && (reinterpret_cast(rs) % sizeof(UInt64) == 0) && - (reinterpret_cast(rd) % sizeof(UInt64) == 0)) { - auto rsw = reinterpret_cast(rs); - auto rdw = reinterpret_cast(rd); - - SizeT words = len / sizeof(UInt64); - - for (SizeT i = 0; i < words; ++i) { - rdw[-1 - static_cast(i)] = rsw[-1 - static_cast(i)]; - } - - SizeT rem = len % sizeof(UInt64); - for (SizeT i = 0; i < rem; ++i) { - rd[-1 - i] = rs[-1 - i]; - } - } else { - // byte-wise backward - for (SizeT i = 0; i < len; ++i) { - rd[-1 - i] = rs[-1 - i]; - } - } - } else { - // try 64-bit aligned forward copy - if (len >= sizeof(UInt64) && (reinterpret_cast(s) % sizeof(UInt64) == 0) && - (reinterpret_cast(d) % sizeof(UInt64) == 0)) { - auto sw = reinterpret_cast(s); - auto dw = reinterpret_cast(d); - SizeT words = len / sizeof(UInt64); - - for (SizeT i = 0; i < words; ++i) { - dw[i] = sw[i]; - } - - SizeT rem = len % sizeof(UInt64); - const SizeT offset = words * sizeof(UInt64); - for (SizeT i = 0; i < rem; ++i) { - d[offset + i] = s[offset + i]; - } - } else { - for (SizeT i = 0; i < len; ++i) { - d[i] = s[i]; - } - } - } - - return dest; -} - -IMPORT_C SInt64 MmStrLen(const Char* in) { - // strlen via pointer walk - if (!in) return -kErrorInvalidData; - - const Char* p = in; - while (*p) ++p; - - return static_cast(p - in); -} - -IMPORT_C VoidPtr MmFillMemory(_Input VoidPtr dest, _Input SizeT len, _Input UInt8 value) { - if (!len || !dest) return nullptr; - - auto d = static_cast(dest); - - if (len >= sizeof(UInt64) && (reinterpret_cast(d) % sizeof(UInt64)) == 0) { - UInt64 pattern = static_cast(value); - pattern |= (pattern << 8); - pattern |= (pattern << 16); - pattern |= (pattern << 32); - - auto dw = reinterpret_cast(d); - SizeT words = len / sizeof(UInt64); - - for (SizeT i = 0; i < words; ++i) { - dw[i] = pattern; - } - - SizeT rem = len % sizeof(UInt64); - const SizeT offset = words * sizeof(UInt64); - for (SizeT i = 0; i < rem; ++i) { - d[offset + i] = value; - } - } else { - for (SizeT i = 0; i < len; ++i) d[i] = value; - } - - return dest; -} - -IMPORT_C Ref IoOpenFile(_Input const Char* path, _Input const Char* drv_letter) { - return static_cast(libsys_syscall_arg_3( - SYSCALL_HASH("IoOpenFile"), Detail::sys_safe_cast(path), Detail::sys_safe_cast(drv_letter))); -} - -IMPORT_C Void IoCloseFile(_Input Ref desc) { - libsys_syscall_arg_2(SYSCALL_HASH("IoCloseFile"), static_cast(desc)); -} - -IMPORT_C UInt64 IoSeekFile(_Input Ref desc, _Input UInt64 off) { - auto ret_ptr = libsys_syscall_arg_3(SYSCALL_HASH("IoSeekFile"), static_cast(desc), - reinterpret_cast(&off)); - - if (!ret_ptr) return ~0UL; - - auto ret = static_cast(ret_ptr); - UInt64 result = *ret; - MUST_PASS(result != ~0UL); - return result; -} - -IMPORT_C UInt64 IoTellFile(_Input Ref desc) { - auto ret_ptr = libsys_syscall_arg_2(SYSCALL_HASH("IoTellFile"), static_cast(desc)); - if (!ret_ptr) return ~0UL; - auto ret = static_cast(ret_ptr); - return *ret; -} - -IMPORT_C SInt32 PrintOut(_Input IORef desc, const Char* fmt, ...) { - va_list args; - va_start(args, fmt); - - auto buf = StrFmt(fmt, args); - - va_end(args); - - // if truncated, `needed` >= kBufferSz; we still send truncated buffer - auto ret_ptr = libsys_syscall_arg_3(SYSCALL_HASH("PrintOut"), static_cast(desc), - Detail::sys_safe_cast(buf)); - - if (!ret_ptr) return -kErrorInvalidData; - - auto ret = static_cast(ret_ptr); - - return *ret; -} diff --git a/dev/libSystem/src/SystemCalls.cc b/dev/libSystem/src/SystemCalls.cc new file mode 100644 index 00000000..571a99a6 --- /dev/null +++ b/dev/libSystem/src/SystemCalls.cc @@ -0,0 +1,193 @@ +/* ------------------------------------------- + + Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved. + +------------------------------------------- */ + +#include +#include +#include +#include + +using namespace LibSystem; + +IMPORT_C Void _rtl_assert(Bool expr, const Char* origin) { + if (!expr) { + PrintOut(nullptr, "Assertion failed: %s\r", origin); + libsys_syscall_arg_1(SYSCALL_HASH("_rtl_debug_break")); + } +} + +/// @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("(null)"); + + return const_cast(""); +} + +// memmove-style copy +IMPORT_C VoidPtr MmCopyMemory(_Input VoidPtr dest, _Input VoidPtr src, _Input SizeT len) { + // handles overlap, prefers 64-bit word copies when aligned + if (!len || !dest || !src) return nullptr; + + auto s = static_cast(src); + auto d = static_cast(dest); + + if (d == s) return dest; + + // decide direction + if (d > s && d < s + len) { + const UInt8* rs = s + len; + UInt8* rd = d + len; + + // try 64-bit aligned backward copy + if (len >= sizeof(UInt64) && (reinterpret_cast(rs) % sizeof(UInt64) == 0) && + (reinterpret_cast(rd) % sizeof(UInt64) == 0)) { + auto rsw = reinterpret_cast(rs); + auto rdw = reinterpret_cast(rd); + + SizeT words = len / sizeof(UInt64); + + for (SizeT i = 0; i < words; ++i) { + rdw[-1 - static_cast(i)] = rsw[-1 - static_cast(i)]; + } + + SizeT rem = len % sizeof(UInt64); + for (SizeT i = 0; i < rem; ++i) { + rd[-1 - i] = rs[-1 - i]; + } + } else { + // byte-wise backward + for (SizeT i = 0; i < len; ++i) { + rd[-1 - i] = rs[-1 - i]; + } + } + } else { + // try 64-bit aligned forward copy + if (len >= sizeof(UInt64) && (reinterpret_cast(s) % sizeof(UInt64) == 0) && + (reinterpret_cast(d) % sizeof(UInt64) == 0)) { + auto sw = reinterpret_cast(s); + auto dw = reinterpret_cast(d); + SizeT words = len / sizeof(UInt64); + + for (SizeT i = 0; i < words; ++i) { + dw[i] = sw[i]; + } + + SizeT rem = len % sizeof(UInt64); + const SizeT offset = words * sizeof(UInt64); + for (SizeT i = 0; i < rem; ++i) { + d[offset + i] = s[offset + i]; + } + } else { + for (SizeT i = 0; i < len; ++i) { + d[i] = s[i]; + } + } + } + + return dest; +} + +IMPORT_C SInt64 MmStrLen(const Char* in) { + // strlen via pointer walk + if (!in) return -kErrorInvalidData; + + const Char* p = in; + while (*p) ++p; + + return static_cast(p - in); +} + +IMPORT_C VoidPtr MmFillMemory(_Input VoidPtr dest, _Input SizeT len, _Input UInt8 value) { + if (!len || !dest) return nullptr; + + auto d = static_cast(dest); + + if (len >= sizeof(UInt64) && (reinterpret_cast(d) % sizeof(UInt64)) == 0) { + UInt64 pattern = static_cast(value); + pattern |= (pattern << 8); + pattern |= (pattern << 16); + pattern |= (pattern << 32); + + auto dw = reinterpret_cast(d); + SizeT words = len / sizeof(UInt64); + + for (SizeT i = 0; i < words; ++i) { + dw[i] = pattern; + } + + SizeT rem = len % sizeof(UInt64); + const SizeT offset = words * sizeof(UInt64); + for (SizeT i = 0; i < rem; ++i) { + d[offset + i] = value; + } + } else { + for (SizeT i = 0; i < len; ++i) d[i] = value; + } + + return dest; +} + +IMPORT_C Ref IoOpenFile(_Input const Char* path, _Input const Char* drv_letter) { + return static_cast(libsys_syscall_arg_3( + SYSCALL_HASH("IoOpenFile"), Verify::sys_safe_cast(path), Verify::sys_safe_cast(drv_letter))); +} + +IMPORT_C Void IoCloseFile(_Input Ref desc) { + libsys_syscall_arg_2(SYSCALL_HASH("IoCloseFile"), static_cast(desc)); +} + +IMPORT_C UInt64 IoSeekFile(_Input Ref desc, _Input UInt64 off) { + auto ret_ptr = libsys_syscall_arg_3(SYSCALL_HASH("IoSeekFile"), static_cast(desc), + reinterpret_cast(&off)); + + if (!ret_ptr) return ~0UL; + + auto ret = static_cast(ret_ptr); + UInt64 result = *ret; + MUST_PASS(result != ~0UL); + return result; +} + +IMPORT_C UInt64 IoTellFile(_Input Ref desc) { + auto ret_ptr = libsys_syscall_arg_2(SYSCALL_HASH("IoTellFile"), static_cast(desc)); + if (!ret_ptr) return ~0UL; + auto ret = static_cast(ret_ptr); + return *ret; +} + +IMPORT_C SInt32 PrintOut(_Input IORef desc, const Char* fmt, ...) { + va_list args; + va_start(args, fmt); + + auto buf = StrFmt(fmt, args); + + va_end(args); + + // if truncated, `needed` >= kBufferSz; we still send truncated buffer + auto ret_ptr = libsys_syscall_arg_3(SYSCALL_HASH("PrintOut"), static_cast(desc), + Verify::sys_safe_cast(buf)); + + if (!ret_ptr) return -kErrorInvalidData; + + auto ret = static_cast(ret_ptr); + + return *ret; +} -- cgit v1.2.3 From 4afdeade47b4295e49b9d65ae26fa218e2fd81dd Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Wed, 8 Oct 2025 21:50:05 +0200 Subject: feat: libSystem: new version of libSystem. --- dev/libSystem/src/JailCalls.cc | 17 +++++++ dev/libSystem/src/Makefile | 6 +-- dev/libSystem/src/SystemCalls.cc | 7 --- dev/libSystem/src/SystemCallsABI+AMD64.asm | 81 ++++++++++++++++++++++++++++++ dev/libSystem/src/SystemProc.asm | 81 ------------------------------ dev/libSystem/src/VerifyCalls.cc | 17 +++++++ 6 files changed, 118 insertions(+), 91 deletions(-) create mode 100644 dev/libSystem/src/JailCalls.cc create mode 100644 dev/libSystem/src/SystemCallsABI+AMD64.asm delete mode 100644 dev/libSystem/src/SystemProc.asm create mode 100644 dev/libSystem/src/VerifyCalls.cc (limited to 'dev/libSystem/src') diff --git a/dev/libSystem/src/JailCalls.cc b/dev/libSystem/src/JailCalls.cc new file mode 100644 index 00000000..32192a13 --- /dev/null +++ b/dev/libSystem/src/JailCalls.cc @@ -0,0 +1,17 @@ +/* ------------------------------------------- + + Copyright (C) 2025, Amlal El Mahrouss, all rights reserved. + +------------------------------------------- */ + +#include +#include +#include +#include +#include + +using namespace LibSystem; + +IMPORT_C struct JAIL* JailGetCurrent(Void) { + (struct JAIL*)libsys_syscall_arg_1(SYSCALL_HASH("JailGetCurrent")); +} \ No newline at end of file diff --git a/dev/libSystem/src/Makefile b/dev/libSystem/src/Makefile index 64ef02cc..ea8e9905 100644 --- a/dev/libSystem/src/Makefile +++ b/dev/libSystem/src/Makefile @@ -1,5 +1,5 @@ ################################################## -# (c) Amlal El Mahrouss, all rights reserved. +# (c) Amlal El Mahrouss and NeKernel contributors, all rights reserved. # This file is for libSystem.dll's syscall stubs. ################################################## @@ -8,9 +8,9 @@ FLAGS=-f win64 .PHONY: error error: - @echo "==> Invalid rule." + @echo "==> Invalid recipe." @echo "==> Use libsys_asm_io_ instead." .PHONY: libsys_asm_io_x64 libsys_asm_io_x64: - $(ASM) $(FLAGS) SystemProc.asm -o SystemProc.stub.obj + $(ASM) $(FLAGS) SystemCallsABI+AMD64.asm -o SystemCallsABI+AMD64.stub.obj diff --git a/dev/libSystem/src/SystemCalls.cc b/dev/libSystem/src/SystemCalls.cc index 571a99a6..3db9368d 100644 --- a/dev/libSystem/src/SystemCalls.cc +++ b/dev/libSystem/src/SystemCalls.cc @@ -11,13 +11,6 @@ using namespace LibSystem; -IMPORT_C Void _rtl_assert(Bool expr, const Char* origin) { - if (!expr) { - PrintOut(nullptr, "Assertion failed: %s\r", origin); - libsys_syscall_arg_1(SYSCALL_HASH("_rtl_debug_break")); - } -} - /// @note this uses the FNV 64-bit variant. IMPORT_C UInt64 libsys_hash_64(const Char* path) { if (!path || *path == 0) return 0; diff --git a/dev/libSystem/src/SystemCallsABI+AMD64.asm b/dev/libSystem/src/SystemCallsABI+AMD64.asm new file mode 100644 index 00000000..da19f41f --- /dev/null +++ b/dev/libSystem/src/SystemCallsABI+AMD64.asm @@ -0,0 +1,81 @@ +;; /* +;; * ======================================================== +;; * +;; * libSystem/src/SystemCallsABI+AMD64.asm +;; * Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved. +;; * +;; * ======================================================== +;; */ + +[bits 64] + +section .text + +global libsys_syscall_arg_1 +global libsys_syscall_arg_2 +global libsys_syscall_arg_3 +global libsys_syscall_arg_4 + +libsys_syscall_arg_1: + push rbp + mov rbp, rsp + + mov r8, rcx + + xor rax, rax + + syscall + + pop rbp + + ret + +libsys_syscall_arg_2: + push rbp + mov rbp, rsp + + mov r8, rcx + mov r9, rdx + + xor rax, rax + + syscall + + pop rbp + + ret + +libsys_syscall_arg_3: + push rbp + mov rbp, rsp + + mov r8, rcx + mov r9, rdx + mov r10, rbx + + xor rax, rax + + syscall + + pop rbp + + ret + +libsys_syscall_arg_4: + push rbp + mov rbp, rsp + + mov rax, r8 + + mov r8, rcx + mov r9, rdx + mov r10, rbx + mov r11, rax + + xor rax, rax + + syscall + + pop rbp + + ret diff --git a/dev/libSystem/src/SystemProc.asm b/dev/libSystem/src/SystemProc.asm deleted file mode 100644 index 991a371f..00000000 --- a/dev/libSystem/src/SystemProc.asm +++ /dev/null @@ -1,81 +0,0 @@ -;; /* -;; * ======================================================== -;; * -;; * libSystem/src/SystemProc.asm -;; * Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved. -;; * -;; * ======================================================== -;; */ - -[bits 64] - -section .text - -global libsys_syscall_arg_1 -global libsys_syscall_arg_2 -global libsys_syscall_arg_3 -global libsys_syscall_arg_4 - -libsys_syscall_arg_1: - push rbp - mov rbp, rsp - - mov r8, rcx - - xor rax, rax - - syscall - - pop rbp - - ret - -libsys_syscall_arg_2: - push rbp - mov rbp, rsp - - mov r8, rcx - mov r9, rdx - - xor rax, rax - - syscall - - pop rbp - - ret - -libsys_syscall_arg_3: - push rbp - mov rbp, rsp - - mov r8, rcx - mov r9, rdx - mov r10, rbx - - xor rax, rax - - syscall - - pop rbp - - ret - -libsys_syscall_arg_4: - push rbp - mov rbp, rsp - - mov rax, r8 - - mov r8, rcx - mov r9, rdx - mov r10, rbx - mov r11, rax - - xor rax, rax - - syscall - - pop rbp - - ret diff --git a/dev/libSystem/src/VerifyCalls.cc b/dev/libSystem/src/VerifyCalls.cc new file mode 100644 index 00000000..fb38c682 --- /dev/null +++ b/dev/libSystem/src/VerifyCalls.cc @@ -0,0 +1,17 @@ +/* ------------------------------------------- + + Copyright (C) 2025, Amlal El Mahrouss, all rights reserved. + +------------------------------------------- */ + +#include +#include + +using namespace LibSystem; + +IMPORT_C Void _rtl_assert(Bool expr, const Char* origin) { + if (!expr) { + PrintOut(nullptr, "Assertion failed: %s\r", origin); + libsys_syscall_arg_1(SYSCALL_HASH("_rtl_debug_break")); + } +} \ No newline at end of file -- cgit v1.2.3 From bcc74b466240a3df8a4750e2a5a60a3748d6b3d7 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Wed, 8 Oct 2025 21:51:20 +0200 Subject: fix: libSystem: return JAIL correctly and fix missing macro in JailCalls.cc Signed-off-by: Amlal El Mahrouss --- dev/libSystem/src/JailCalls.cc | 2 +- dev/libSystem/src/VerifyCalls.cc | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'dev/libSystem/src') diff --git a/dev/libSystem/src/JailCalls.cc b/dev/libSystem/src/JailCalls.cc index 32192a13..85796e9f 100644 --- a/dev/libSystem/src/JailCalls.cc +++ b/dev/libSystem/src/JailCalls.cc @@ -13,5 +13,5 @@ using namespace LibSystem; IMPORT_C struct JAIL* JailGetCurrent(Void) { - (struct JAIL*)libsys_syscall_arg_1(SYSCALL_HASH("JailGetCurrent")); + return (struct JAIL*)libsys_syscall_arg_1(SYSCALL_HASH("JailGetCurrent")); } \ No newline at end of file diff --git a/dev/libSystem/src/VerifyCalls.cc b/dev/libSystem/src/VerifyCalls.cc index fb38c682..83617ae0 100644 --- a/dev/libSystem/src/VerifyCalls.cc +++ b/dev/libSystem/src/VerifyCalls.cc @@ -6,6 +6,7 @@ #include #include +#include using namespace LibSystem; -- cgit v1.2.3 From 212c57ea05bf918dc26fe8864ad617f2f6259cea Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Fri, 10 Oct 2025 10:30:38 +0200 Subject: feat: kernel: dispatch structures have two new methods. Signed-off-by: Amlal El Mahrouss --- dev/kernel/ArchKit/ArchKit.h | 6 ++++++ dev/kernel/CFKit/GUIDWrapper.h | 5 ++--- dev/kernel/src/UserMgr.cc | 2 +- dev/kernel/src/UserProcessScheduler.cc | 1 - dev/libSystem/src/JailCalls.cc | 4 ++-- dev/libSystem/src/VerifyCalls.cc | 2 +- 6 files changed, 12 insertions(+), 8 deletions(-) (limited to 'dev/libSystem/src') diff --git a/dev/kernel/ArchKit/ArchKit.h b/dev/kernel/ArchKit/ArchKit.h index 2042bded..9c45b6bb 100644 --- a/dev/kernel/ArchKit/ArchKit.h +++ b/dev/kernel/ArchKit/ArchKit.h @@ -75,6 +75,9 @@ struct HAL_DISPATCH_ENTRY final { Kernel::Bool fHooked; rt_syscall_proc fProc; + BOOL IsKernCall() { return NO; } + BOOL IsSysCall() { return YES; } + operator bool() { return fHooked; } }; @@ -86,6 +89,9 @@ struct HAL_KERNEL_DISPATCH_ENTRY final { Kernel::Bool fHooked; rt_kerncall_proc fProc; + BOOL IsKernCall() { return YES; } + BOOL IsSysCall() { return NO; } + operator bool() { return fHooked; } }; diff --git a/dev/kernel/CFKit/GUIDWrapper.h b/dev/kernel/CFKit/GUIDWrapper.h index 05cb4754..14a96fde 100644 --- a/dev/kernel/CFKit/GUIDWrapper.h +++ b/dev/kernel/CFKit/GUIDWrapper.h @@ -16,7 +16,7 @@ /// @brief eXtended Resource Namespace namespace Kernel::CF::XRN { -union GUIDSequence { +union GUIDSequence final { alignas(8) UShort fU8[16]; alignas(8) UShort fU16[8]; alignas(8) UInt fU32[4]; @@ -36,8 +36,7 @@ class GUID final { ~GUID() = default; public: - GUID& operator=(const GUID&) = default; - GUID(const GUID&) = default; + NE_COPY_DEFAULT(GUID) public: GUIDSequence& operator->() noexcept { return fUUID; } diff --git a/dev/kernel/src/UserMgr.cc b/dev/kernel/src/UserMgr.cc index 9db1ca4d..5ee2aa33 100644 --- a/dev/kernel/src/UserMgr.cc +++ b/dev/kernel/src/UserMgr.cc @@ -39,7 +39,7 @@ namespace Detail { kout << "user_fnv_generator: Hashing user password...\r"; const UInt64 kFnvOffsetBasis = 0xcbf29ce484222325ULL; - const UInt64 fFnvPrime = 0x100000001b3ULL; + const UInt64 fFnvPrime = 0x100000001b3ULL; UInt64 hash = kFnvOffsetBasis; diff --git a/dev/kernel/src/UserProcessScheduler.cc b/dev/kernel/src/UserProcessScheduler.cc index ad6263c8..af54799e 100644 --- a/dev/kernel/src/UserProcessScheduler.cc +++ b/dev/kernel/src/UserProcessScheduler.cc @@ -21,7 +21,6 @@ #include #include #include -#include #include ///! BUGS: 0 diff --git a/dev/libSystem/src/JailCalls.cc b/dev/libSystem/src/JailCalls.cc index 85796e9f..5cb47bb5 100644 --- a/dev/libSystem/src/JailCalls.cc +++ b/dev/libSystem/src/JailCalls.cc @@ -5,13 +5,13 @@ ------------------------------------------- */ #include +#include #include #include -#include #include using namespace LibSystem; IMPORT_C struct JAIL* JailGetCurrent(Void) { - return (struct JAIL*)libsys_syscall_arg_1(SYSCALL_HASH("JailGetCurrent")); + return (struct JAIL*) libsys_syscall_arg_1(SYSCALL_HASH("JailGetCurrent")); } \ No newline at end of file diff --git a/dev/libSystem/src/VerifyCalls.cc b/dev/libSystem/src/VerifyCalls.cc index 83617ae0..078f921b 100644 --- a/dev/libSystem/src/VerifyCalls.cc +++ b/dev/libSystem/src/VerifyCalls.cc @@ -5,8 +5,8 @@ ------------------------------------------- */ #include -#include #include +#include using namespace LibSystem; -- cgit v1.2.3