mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:48:12 +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:
parent
e71c320154
commit
bfbb4bcd9b
4 changed files with 14 additions and 51 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue