mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 08:27:45 +00:00
UserspaceEmulator: Add stub for sys$futex
This commit is contained in:
parent
8b5ea01cfb
commit
ce0c76dcb5
2 changed files with 11 additions and 0 deletions
|
@ -169,6 +169,7 @@ private:
|
||||||
int virt$recvfd(int, int);
|
int virt$recvfd(int, int);
|
||||||
int virt$sendfd(int, int);
|
int virt$sendfd(int, int);
|
||||||
int virt$msyscall(FlatPtr);
|
int virt$msyscall(FlatPtr);
|
||||||
|
int virt$futex(FlatPtr);
|
||||||
|
|
||||||
bool find_malloc_symbols(const MmapRegion& libc_text);
|
bool find_malloc_symbols(const MmapRegion& libc_text);
|
||||||
|
|
||||||
|
|
|
@ -242,6 +242,8 @@ u32 Emulator::virt_syscall(u32 function, u32 arg1, u32 arg2, u32 arg3)
|
||||||
return virt$chown(arg1);
|
return virt$chown(arg1);
|
||||||
case SC_msyscall:
|
case SC_msyscall:
|
||||||
return virt$msyscall(arg1);
|
return virt$msyscall(arg1);
|
||||||
|
case SC_futex:
|
||||||
|
return virt$futex(arg1);
|
||||||
default:
|
default:
|
||||||
reportln("\n=={}== \033[31;1mUnimplemented syscall: {}\033[0m, {:p}", getpid(), Syscall::to_string((Syscall::Function)function), function);
|
reportln("\n=={}== \033[31;1mUnimplemented syscall: {}\033[0m, {:p}", getpid(), Syscall::to_string((Syscall::Function)function), function);
|
||||||
dump_backtrace();
|
dump_backtrace();
|
||||||
|
@ -1463,4 +1465,12 @@ int Emulator::virt$msyscall(FlatPtr)
|
||||||
return 0;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue