mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 02:12:09 -05:00
UserspaceEmulator: Remove support for SC_select syscall
This commit is contained in:
parent
012d8d7f74
commit
ee34340c6a
2 changed files with 0 additions and 42 deletions
|
@ -210,7 +210,6 @@ private:
|
|||
int virt$rmdir(FlatPtr path, size_t path_length);
|
||||
int virt$sched_getparam(pid_t, FlatPtr);
|
||||
int virt$sched_setparam(int, FlatPtr);
|
||||
int virt$select(FlatPtr);
|
||||
int virt$sendfd(int, int);
|
||||
int virt$sendmsg(int sockfd, FlatPtr msg_addr, int flags);
|
||||
int virt$set_coredump_metadata(FlatPtr address);
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
#include <sys/ioctl.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/poll.h>
|
||||
#include <sys/select.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
|
@ -203,8 +202,6 @@ u32 Emulator::virt_syscall(u32 function, u32 arg1, u32 arg2, u32 arg3)
|
|||
return virt$sched_getparam(arg1, arg2);
|
||||
case SC_sched_setparam:
|
||||
return virt$sched_setparam(arg1, arg2);
|
||||
case SC_select:
|
||||
return virt$select(arg1);
|
||||
case SC_sendfd:
|
||||
return virt$sendfd(arg1, arg2);
|
||||
case SC_sendmsg:
|
||||
|
@ -700,44 +697,6 @@ int Emulator::virt$sendmsg(int sockfd, FlatPtr msg_addr, int flags)
|
|||
return sendmsg(sockfd, &msg, flags);
|
||||
}
|
||||
|
||||
int Emulator::virt$select(FlatPtr params_addr)
|
||||
{
|
||||
Syscall::SC_select_params params;
|
||||
mmu().copy_from_vm(¶ms, params_addr, sizeof(params));
|
||||
|
||||
fd_set readfds {};
|
||||
fd_set writefds {};
|
||||
fd_set exceptfds {};
|
||||
struct timespec timeout;
|
||||
u32 sigmask;
|
||||
|
||||
if (params.readfds)
|
||||
mmu().copy_from_vm(&readfds, (FlatPtr)params.readfds, sizeof(readfds));
|
||||
if (params.writefds)
|
||||
mmu().copy_from_vm(&writefds, (FlatPtr)params.writefds, sizeof(writefds));
|
||||
if (params.exceptfds)
|
||||
mmu().copy_from_vm(&exceptfds, (FlatPtr)params.exceptfds, sizeof(exceptfds));
|
||||
if (params.timeout)
|
||||
mmu().copy_from_vm(&timeout, (FlatPtr)params.timeout, sizeof(timeout));
|
||||
if (params.sigmask)
|
||||
mmu().copy_from_vm(&sigmask, (FlatPtr)params.sigmask, sizeof(sigmask));
|
||||
|
||||
int rc = pselect(params.nfds, &readfds, &writefds, &exceptfds, params.timeout ? &timeout : nullptr, params.sigmask ? &sigmask : nullptr);
|
||||
if (rc < 0)
|
||||
return -errno;
|
||||
|
||||
if (params.readfds)
|
||||
mmu().copy_to_vm((FlatPtr)params.readfds, &readfds, sizeof(readfds));
|
||||
if (params.writefds)
|
||||
mmu().copy_to_vm((FlatPtr)params.writefds, &writefds, sizeof(writefds));
|
||||
if (params.exceptfds)
|
||||
mmu().copy_to_vm((FlatPtr)params.exceptfds, &exceptfds, sizeof(exceptfds));
|
||||
if (params.timeout)
|
||||
mmu().copy_to_vm((FlatPtr)params.timeout, &timeout, sizeof(timeout));
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
int Emulator::virt$getsockopt(FlatPtr params_addr)
|
||||
{
|
||||
Syscall::SC_getsockopt_params params;
|
||||
|
|
Loading…
Add table
Reference in a new issue