diff --git a/Userland/DevTools/UserspaceEmulator/Emulator.h b/Userland/DevTools/UserspaceEmulator/Emulator.h index 0fe3191aad6..5cc02aaa305 100644 --- a/Userland/DevTools/UserspaceEmulator/Emulator.h +++ b/Userland/DevTools/UserspaceEmulator/Emulator.h @@ -169,6 +169,7 @@ private: int virt$recvfd(int, int); int virt$sendfd(int, int); int virt$msyscall(FlatPtr); + int virt$futex(FlatPtr); bool find_malloc_symbols(const MmapRegion& libc_text); diff --git a/Userland/DevTools/UserspaceEmulator/Emulator_syscalls.cpp b/Userland/DevTools/UserspaceEmulator/Emulator_syscalls.cpp index 090533b937a..4eea04b2b22 100644 --- a/Userland/DevTools/UserspaceEmulator/Emulator_syscalls.cpp +++ b/Userland/DevTools/UserspaceEmulator/Emulator_syscalls.cpp @@ -242,6 +242,8 @@ u32 Emulator::virt_syscall(u32 function, u32 arg1, u32 arg2, u32 arg3) return virt$chown(arg1); case SC_msyscall: return virt$msyscall(arg1); + case SC_futex: + return virt$futex(arg1); default: reportln("\n=={}== \033[31;1mUnimplemented syscall: {}\033[0m, {:p}", getpid(), Syscall::to_string((Syscall::Function)function), function); dump_backtrace(); @@ -1463,4 +1465,12 @@ int Emulator::virt$msyscall(FlatPtr) return 0; } +int Emulator::virt$futex(FlatPtr params_addr) +{ + Syscall::SC_futex_params params; + mmu().copy_from_vm(¶ms, params_addr, sizeof(params)); + + // FIXME: Implement this. + return 0; +} }