summaryrefslogtreecommitdiffhomepage
path: root/dev
diff options
context:
space:
mode:
Diffstat (limited to 'dev')
-rw-r--r--dev/kernel/src/UserProcessScheduler.cc1
-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
-rw-r--r--dev/open_msg/.keep (renamed from dev/system_sdk/.keep)0
-rw-r--r--dev/open_msg/MsgKit/Server.h22
-rw-r--r--dev/open_msg/obj/.keep0
-rw-r--r--dev/open_msg/script/window.msg6
-rw-r--r--dev/open_msg/src/.keep0
14 files changed, 56 insertions, 14 deletions
diff --git a/dev/kernel/src/UserProcessScheduler.cc b/dev/kernel/src/UserProcessScheduler.cc
index 1454585c..e6309589 100644
--- a/dev/kernel/src/UserProcessScheduler.cc
+++ b/dev/kernel/src/UserProcessScheduler.cc
@@ -504,6 +504,7 @@ SizeT UserProcessScheduler::Run() noexcept {
if (UserProcessHelper::Switch(process.StackFrame, process.ProcessId)) {
process.PTime = static_cast<Int32>(process.Affinity);
+ // We add a bigger cooldown according to the RTime and affinity here.
if (process.PTime < process.RTime && AffinityKind::kRealTime != process.Affinity) {
if (process.RTime < (Int32) AffinityKind::kVeryHigh)
process.RTime = (Int32) AffinityKind::kLowUsage / 2;
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
diff --git a/dev/system_sdk/.keep b/dev/open_msg/.keep
index e69de29b..e69de29b 100644
--- a/dev/system_sdk/.keep
+++ b/dev/open_msg/.keep
diff --git a/dev/open_msg/MsgKit/Server.h b/dev/open_msg/MsgKit/Server.h
new file mode 100644
index 00000000..867d3b54
--- /dev/null
+++ b/dev/open_msg/MsgKit/Server.h
@@ -0,0 +1,22 @@
+/* -------------------------------------------
+
+ Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NeKit/KString.h>
+#include <NeKit/MutableArray.h>
+
+struct OPENMSG_EXPR;
+
+struct OPENMSG_EXPR {
+ Kernel::KString* l_head;
+ Kernel::MutableArray<OPENMSG_EXPR> l_args;
+};
+
+typedef Kernel::Void(*openmsg_func_t)(OPENMSG_EXPR* arg);
+
+EXTERN_C Kernel::Void openmsg_init_library(openmsg_func_t* funcs, Kernel::SizeT cnt);
+EXTERN_C Kernel::UInt32 openmsg_close_library(Kernel::Void);
diff --git a/dev/open_msg/obj/.keep b/dev/open_msg/obj/.keep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/dev/open_msg/obj/.keep
diff --git a/dev/open_msg/script/window.msg b/dev/open_msg/script/window.msg
new file mode 100644
index 00000000..77d6ef69
--- /dev/null
+++ b/dev/open_msg/script/window.msg
@@ -0,0 +1,6 @@
+(window
+ :id 1
+ :pos (x 100 y 100)
+ :size (w 300 h 200)
+ :title "My App"
+ :on-click (lambda () (log "Clicked!"))) \ No newline at end of file
diff --git a/dev/open_msg/src/.keep b/dev/open_msg/src/.keep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/dev/open_msg/src/.keep