mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:47:44 +00:00
Kernel+LibSystem: Add a 4th syscall argument
Let's allow passing 4 function arguments to a syscall. The 4th argument goes into ESI or RSI.
This commit is contained in:
parent
9b78ae5149
commit
deff554096
5 changed files with 33 additions and 8 deletions
|
@ -15,6 +15,7 @@ uintptr_t syscall0(uintptr_t function);
|
|||
uintptr_t syscall1(uintptr_t function, uintptr_t arg0);
|
||||
uintptr_t syscall2(uintptr_t function, uintptr_t arg0, uintptr_t arg1);
|
||||
uintptr_t syscall3(uintptr_t function, uintptr_t arg0, uintptr_t arg1, uintptr_t arg2);
|
||||
uintptr_t syscall4(uintptr_t function, uintptr_t arg0, uintptr_t arg1, uintptr_t arg2, uintptr_t arg3);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -39,4 +40,9 @@ inline uintptr_t syscall(auto function, auto arg0, auto arg1, auto arg2)
|
|||
return syscall3((uintptr_t)function, (uintptr_t)arg0, (uintptr_t)arg1, (uintptr_t)arg2);
|
||||
}
|
||||
|
||||
inline uintptr_t syscall(auto function, auto arg0, auto arg1, auto arg2, auto arg3)
|
||||
{
|
||||
return syscall4((uintptr_t)function, (uintptr_t)arg0, (uintptr_t)arg1, (uintptr_t)arg2, (uintptr_t)arg3);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue