mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
Kernel+UserspaceEmulator: Add sys$emuctl() system call
This returns ENOSYS if you are running in the real kernel, and some other result if you are running in UserspaceEmulator. There are other ways we could check if we're inside an emulator, but it seemed easier to just ask. :^)
This commit is contained in:
Notes:
sideshowbarker
2024-07-18 21:35:20 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/84725ef3a5d
@@ -518,6 +518,8 @@ u32 Emulator::virt_syscall(u32 function, u32 arg1, u32 arg2, u32 arg3)
|
||||
return virt$getrandom(arg1, arg2, arg3);
|
||||
case SC_fork:
|
||||
return virt$fork();
|
||||
case SC_emuctl:
|
||||
return virt$emuctl();
|
||||
case SC_sched_getparam:
|
||||
return virt$sched_getparam(arg1, arg2);
|
||||
case SC_sched_setparam:
|
||||
@@ -1265,6 +1267,11 @@ int Emulator::virt$ioctl([[maybe_unused]] int fd, unsigned request, [[maybe_unus
|
||||
TODO();
|
||||
}
|
||||
|
||||
int Emulator::virt$emuctl()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int Emulator::virt$fork()
|
||||
{
|
||||
int rc = fork();
|
||||
|
||||
Reference in New Issue
Block a user