mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:28:12 +00:00
UserspaceEmulator: Support the anon_create, sendfd and recvfd syscalls
This commit is contained in:
parent
20915795a8
commit
12879184ce
2 changed files with 24 additions and 0 deletions
|
@ -453,6 +453,12 @@ u32 Emulator::virt_syscall(u32 function, u32 arg1, u32 arg2, u32 arg3)
|
|||
return virt$mprotect(arg1, arg2, arg3);
|
||||
case SC_madvise:
|
||||
return virt$madvise(arg1, arg2, arg3);
|
||||
case SC_anon_create:
|
||||
return virt$anon_create(arg1, arg2);
|
||||
case SC_sendfd:
|
||||
return virt$sendfd(arg1, arg2);
|
||||
case SC_recvfd:
|
||||
return virt$recvfd(arg1);
|
||||
case SC_open:
|
||||
return virt$open(arg1);
|
||||
case SC_pipe:
|
||||
|
@ -545,6 +551,21 @@ u32 Emulator::virt_syscall(u32 function, u32 arg1, u32 arg2, u32 arg3)
|
|||
}
|
||||
}
|
||||
|
||||
int Emulator::virt$anon_create(size_t size, int options)
|
||||
{
|
||||
return syscall(SC_anon_create, size, options);
|
||||
}
|
||||
|
||||
int Emulator::virt$sendfd(int socket, int fd)
|
||||
{
|
||||
return syscall(SC_sendfd, socket, fd);
|
||||
}
|
||||
|
||||
int Emulator::virt$recvfd(int socket)
|
||||
{
|
||||
return syscall(SC_recvfd, socket);
|
||||
}
|
||||
|
||||
int Emulator::virt$shbuf_create(int size, FlatPtr buffer)
|
||||
{
|
||||
u8* host_data = nullptr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue