summaryrefslogtreecommitdiffhomepage
path: root/dev/libSystem
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-05-30 14:42:35 +0200
committerAmlal El Mahrouss <amlal@nekernel.org>2025-05-30 14:42:35 +0200
commit86b89793dcaf290206faeb7fe3100dd0a5f71d1d (patch)
tree7ebb5128173f7b48b1e8629f6be031e62b6a5427 /dev/libSystem
parent0e92d4841f0d1b6a5f2e1b093d9d0b6864dfac93 (diff)
global: architectural changes, see commit details.
refactor: Refactor libSystem, user frameworks, and preparing for OpenMSG. feat: Jail info client structure (libSystem) feat: Document what the RTime is doing starting from line 504. feat: use `int 50` instead of `syscall` for now. Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/libSystem')
-rw-r--r--dev/libSystem/SystemKit/Err.h (renamed from dev/libSystem/Err.h)2
-rw-r--r--dev/libSystem/SystemKit/Jail.h (renamed from dev/libSystem/Jail.h)12
-rw-r--r--dev/libSystem/SystemKit/Macros.h (renamed from dev/libSystem/Macros.h)4
-rw-r--r--dev/libSystem/SystemKit/Syscall.h (renamed from dev/libSystem/Syscall.h)2
-rw-r--r--dev/libSystem/SystemKit/System.h (renamed from dev/libSystem/System.h)2
-rw-r--r--dev/libSystem/src/Makefile2
-rw-r--r--dev/libSystem/src/SystemImpl.cc (renamed from dev/libSystem/src/SystemAPI.cc)4
-rw-r--r--dev/libSystem/src/SystemProc.asm13
8 files changed, 27 insertions, 14 deletions
diff --git a/dev/libSystem/Err.h b/dev/libSystem/SystemKit/Err.h
index e9fe013b..c0a2282b 100644
--- a/dev/libSystem/Err.h
+++ b/dev/libSystem/SystemKit/Err.h
@@ -6,7 +6,7 @@
#pragma once
-#include <libSystem/Macros.h>
+#include <libSystem/SystemKit/Macros.h>
/// @file Err.h
/// @brief Process Codes type and values.
diff --git a/dev/libSystem/Jail.h b/dev/libSystem/SystemKit/Jail.h
index 6a9259fc..93734dcf 100644
--- a/dev/libSystem/Jail.h
+++ b/dev/libSystem/SystemKit/Jail.h
@@ -6,10 +6,18 @@
#pragma once
-#include <libSystem/System.h>
+#include <libSystem/SystemKit/System.h>
/// @file Jail.h
/// @brief NeKernel Jail System
struct JAIL_INFO;
-struct JAIL; \ No newline at end of file
+struct JAIL;
+
+/// @brief Jail information (client side struct)
+struct JAIL_INFO
+{
+ SInt32 fParentID;
+ SInt32 fJailHash;
+ SInt64 fACL;
+}; \ No newline at end of file
diff --git a/dev/libSystem/Macros.h b/dev/libSystem/SystemKit/Macros.h
index 5b3a5ce1..48c586cc 100644
--- a/dev/libSystem/Macros.h
+++ b/dev/libSystem/SystemKit/Macros.h
@@ -82,8 +82,6 @@ typedef nullPtr NullPtr;
#endif
-IMPORT_C void _rtl_assert(Bool expr, const Char* origin);
-
#define MUST_PASS(X) _rtl_assert(X, __FILE__)
#ifndef ARRAY_SIZE
@@ -124,3 +122,5 @@ IMPORT_C void _rtl_assert(Bool expr, const Char* origin);
#endif
#define LIBSYS_UNUSED(X) ((void) X)
+
+IMPORT_C void _rtl_assert(Bool expr, const Char* origin);
diff --git a/dev/libSystem/Syscall.h b/dev/libSystem/SystemKit/Syscall.h
index 21f8287c..1a334ead 100644
--- a/dev/libSystem/Syscall.h
+++ b/dev/libSystem/SystemKit/Syscall.h
@@ -6,7 +6,7 @@
#pragma once
-#include <libSystem/System.h>
+#include <libSystem/SystemKit/System.h>
#include <cstdarg>
#ifndef SYSCALL_HASH
diff --git a/dev/libSystem/System.h b/dev/libSystem/SystemKit/System.h
index 88e1f173..b3d10e32 100644
--- a/dev/libSystem/System.h
+++ b/dev/libSystem/SystemKit/System.h
@@ -10,7 +10,7 @@ Purpose: System Call Interface.
#ifndef LIBSYS_SYSTEM_CALLS_H
#define LIBSYS_SYSTEM_CALLS_H
-#include <libSystem/Macros.h>
+#include <libSystem/SystemKit/Macros.h>
// ------------------------------------------------------------------------------------------ //
/// @brief Types API.
diff --git a/dev/libSystem/src/Makefile b/dev/libSystem/src/Makefile
index 41c99c4d..39af446b 100644
--- a/dev/libSystem/src/Makefile
+++ b/dev/libSystem/src/Makefile
@@ -13,4 +13,4 @@ error:
.PHONY: libsys_asm_io_x64
libsys_asm_io_x64:
- $(ASM) $(FLAGS) SystemProc.asm -o SystemProc.asm.obj
+ $(ASM) $(FLAGS) SystemProc.asm -o SystemProc.stub.obj
diff --git a/dev/libSystem/src/SystemAPI.cc b/dev/libSystem/src/SystemImpl.cc
index 37e835c1..6c2201fe 100644
--- a/dev/libSystem/src/SystemAPI.cc
+++ b/dev/libSystem/src/SystemImpl.cc
@@ -4,8 +4,8 @@
------------------------------------------- */
-#include <libSystem/Syscall.h>
-#include <libSystem/System.h>
+#include <libSystem/SystemKit/Syscall.h>
+#include <libSystem/SystemKit/System.h>
/// @file SystemAPI.cc
/// @brief System wide API for NeKernel.
diff --git a/dev/libSystem/src/SystemProc.asm b/dev/libSystem/src/SystemProc.asm
index bc41059a..299b59f9 100644
--- a/dev/libSystem/src/SystemProc.asm
+++ b/dev/libSystem/src/SystemProc.asm
@@ -21,7 +21,8 @@ libsys_syscall_arg_1:
mov rbp, rsp
mov r8, rcx
- syscall
+
+ int 50
pop rbp
@@ -33,7 +34,9 @@ libsys_syscall_arg_2:
mov r8, rcx
mov r9, rdx
- syscall
+
+ int 50
+
pop rbp
ret
@@ -46,7 +49,8 @@ libsys_syscall_arg_3:
mov r9, rdx
mov r10, rbx
- syscall
+ int 50
+
pop rbp
ret
@@ -60,7 +64,8 @@ libsys_syscall_arg_4:
mov r10, rbx
mov r11, rax
- syscall
+ int 50
+
pop rbp
ret