mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
Kernel: Remove trap based syscall handling
This patch removes the x86 mechanism for calling syscalls, favoring the more modern syscall instruction. It also moves architecture dependent code from functions that are meant to be architecture agnostic therefore paving the way for adding more architectures.
This commit is contained in:
committed by
Andrew Kaster
parent
e71c320154
commit
bfbb4bcd9b
@@ -9,6 +9,7 @@
|
||||
#include <AK/Types.h>
|
||||
#include <AK/Userspace.h>
|
||||
#include <Kernel/API/POSIX/sched.h>
|
||||
#include <Kernel/Arch/RegisterState.h>
|
||||
|
||||
constexpr int syscall_vector = 0x82;
|
||||
|
||||
@@ -201,6 +202,8 @@ enum class NeedsBigProcessLock {
|
||||
|
||||
namespace Syscall {
|
||||
|
||||
ErrorOr<FlatPtr> handle(RegisterState&, FlatPtr function, FlatPtr arg1, FlatPtr arg2, FlatPtr arg3, FlatPtr arg4);
|
||||
|
||||
enum Function {
|
||||
#undef __ENUMERATE_SYSCALL
|
||||
#define __ENUMERATE_SYSCALL(sys_call, needs_lock) SC_##sys_call,
|
||||
|
||||
Reference in New Issue
Block a user