mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 00:07:34 +00:00
UserspaceEmulator: Add the usleep() syscall
This commit is contained in:
parent
27aa2e5841
commit
b17d175379
2 changed files with 8 additions and 0 deletions
|
@ -226,6 +226,8 @@ u32 Emulator::virt_syscall(u32 function, u32 arg1, u32 arg2, u32 arg3)
|
|||
dbgprintf("Syscall: %s (%x)\n", Syscall::to_string((Syscall::Function)function), function);
|
||||
#endif
|
||||
switch (function) {
|
||||
case SC_usleep:
|
||||
return virt$usleep(arg1);
|
||||
case SC_shbuf_create:
|
||||
return virt$shbuf_create(arg1, arg2);
|
||||
case SC_shbuf_allow_pid:
|
||||
|
@ -327,6 +329,11 @@ u32 Emulator::virt_syscall(u32 function, u32 arg1, u32 arg2, u32 arg3)
|
|||
}
|
||||
}
|
||||
|
||||
int Emulator::virt$usleep(useconds_t us)
|
||||
{
|
||||
return syscall(SC_usleep, us);
|
||||
}
|
||||
|
||||
int Emulator::virt$shbuf_create(int size, FlatPtr buffer)
|
||||
{
|
||||
u8* host_data = nullptr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue