diff options
author | Brendan Coles <bcoles@gmail.com> | 2020-12-16 15:31:37 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-12-16 17:27:20 +0100 |
commit | a46e48089d86c7c692e605f96befb04db40e03be (patch) | |
tree | 2642c880e3dd802e9234289a49957398d711b8b7 | |
parent | 3e72fd68b03345fcb1368f4cc8eca40df0ae72a3 (diff) | |
download | serenity-a46e48089d86c7c692e605f96befb04db40e03be.zip |
UserspaceEmulator: Implement beep syscall
-rw-r--r-- | DevTools/UserspaceEmulator/Emulator.cpp | 7 | ||||
-rw-r--r-- | DevTools/UserspaceEmulator/Emulator.h | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/DevTools/UserspaceEmulator/Emulator.cpp b/DevTools/UserspaceEmulator/Emulator.cpp index 3ff9119b7b..f3c131ddaf 100644 --- a/DevTools/UserspaceEmulator/Emulator.cpp +++ b/DevTools/UserspaceEmulator/Emulator.cpp @@ -507,6 +507,8 @@ u32 Emulator::virt_syscall(u32 function, u32 arg1, u32 arg2, u32 arg3) return virt$readlink(arg1); case SC_allocate_tls: return virt$allocate_tls(arg1); + case SC_beep: + return virt$beep(); default: reportln("\n=={}== \033[31;1mUnimplemented syscall: {}\033[0m, {:p}", getpid(), Syscall::to_string((Syscall::Function)function), function); dump_backtrace(); @@ -1688,6 +1690,11 @@ u32 Emulator::virt$allocate_tls(size_t size) return tls_base; } +int Emulator::virt$beep() +{ + return syscall(SC_beep); +} + bool Emulator::find_malloc_symbols(const MmapRegion& libc_text) { auto mapped_file = make<MappedFile>("/usr/lib/libc.so"); diff --git a/DevTools/UserspaceEmulator/Emulator.h b/DevTools/UserspaceEmulator/Emulator.h index 8696ee4a32..9e9ddcba0f 100644 --- a/DevTools/UserspaceEmulator/Emulator.h +++ b/DevTools/UserspaceEmulator/Emulator.h @@ -163,6 +163,7 @@ private: int virt$watch_file(FlatPtr, size_t); int virt$readlink(FlatPtr); u32 virt$allocate_tls(size_t); + int virt$beep(); FlatPtr allocate_vm(size_t size, size_t alignment); bool find_malloc_symbols(const MmapRegion& libc_text); |