mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 03:55:24 +00:00
UserspaceEmulator: Implement profiling, disown, purge syscalls
This commit is contained in:
parent
39c92dad83
commit
9ca34c3047
Notes:
sideshowbarker
2024-07-19 00:41:44 +09:00
Author: https://github.com/bcoles Commit: https://github.com/SerenityOS/serenity/commit/9ca34c3047e Pull-request: https://github.com/SerenityOS/serenity/pull/4475
2 changed files with 32 additions and 0 deletions
|
@ -395,6 +395,14 @@ u32 Emulator::virt_syscall(u32 function, u32 arg1, u32 arg2, u32 arg3)
|
|||
return virt$shbuf_seal(arg1);
|
||||
case SC_shbuf_set_volatile:
|
||||
return virt$shbuf_set_volatile(arg1, arg2);
|
||||
case SC_profiling_enable:
|
||||
return virt$profiling_enable(arg1);
|
||||
case SC_profiling_disable:
|
||||
return virt$profiling_disable(arg1);
|
||||
case SC_disown:
|
||||
return virt$disown(arg1);
|
||||
case SC_purge:
|
||||
return virt$purge(arg1);
|
||||
case SC_mmap:
|
||||
return virt$mmap(arg1);
|
||||
case SC_mount:
|
||||
|
@ -590,6 +598,26 @@ int Emulator::virt$shbuf_set_volatile(int shbuf_id, bool is_volatile)
|
|||
return region->set_volatile(is_volatile);
|
||||
}
|
||||
|
||||
int Emulator::virt$profiling_enable(pid_t pid)
|
||||
{
|
||||
return syscall(SC_profiling_enable, pid);
|
||||
}
|
||||
|
||||
int Emulator::virt$profiling_disable(pid_t pid)
|
||||
{
|
||||
return syscall(SC_profiling_disable, pid);
|
||||
}
|
||||
|
||||
int Emulator::virt$disown(pid_t pid)
|
||||
{
|
||||
return syscall(SC_disown, pid);
|
||||
}
|
||||
|
||||
int Emulator::virt$purge(int mode)
|
||||
{
|
||||
return syscall(SC_purge, mode);
|
||||
}
|
||||
|
||||
int Emulator::virt$fstat(int fd, FlatPtr statbuf)
|
||||
{
|
||||
struct stat local_statbuf;
|
||||
|
|
|
@ -98,6 +98,10 @@ private:
|
|||
int virt$shbuf_release(int shbuf_id);
|
||||
int virt$shbuf_seal(int shbuf_id);
|
||||
int virt$shbuf_set_volatile(int shbuf_id, bool);
|
||||
int virt$profiling_enable(pid_t);
|
||||
int virt$profiling_disable(pid_t);
|
||||
int virt$disown(pid_t);
|
||||
int virt$purge(int mode);
|
||||
u32 virt$mmap(u32);
|
||||
u32 virt$mount(u32);
|
||||
u32 virt$munmap(FlatPtr address, u32 size);
|
||||
|
|
Loading…
Add table
Reference in a new issue