mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-03-06 05:24:17 +00:00
UserspaceEmulator: Add the usleep() syscall
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user