Kernel: moved read/write_from_user out of Process

This commit is contained in:
2026-05-20 17:52:19 +03:00
committed by Bananymous
parent 14aa28b043
commit 718379ce3b
7 changed files with 67 additions and 47 deletions
+2 -1
View File
@@ -9,6 +9,7 @@
#include <kernel/Scheduler.h>
#include <kernel/Thread.h>
#include <kernel/Timer/Timer.h>
#include <kernel/UserCopy.h>
namespace Kernel
{
@@ -727,7 +728,7 @@ namespace Kernel
{
static_assert(sizeof(T) >= sizeof(uintptr_t));
sp -= sizeof(T);
if (m_process->write_to_user(reinterpret_cast<void*>(sp), &value, sizeof(T)).is_error())
if (write_to_user(reinterpret_cast<void*>(sp), &value, sizeof(T)).is_error())
m_process->exit(128 + SIGSEGV, SIGSEGV | 0x80);
};