mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:47:44 +00:00
Kernel: Partial usage of Userspace<T> for the poll syscall
This change mostly converts poll to Userspace<T> with the caveat of the fds member of SC_poll_params. It's current usage is a bit too gnarly for me to take on right now, this appears to need a lot more love. In addition to enlightening the syscall to use Userspace<T>, I've also re-worked most of the handling to use validate_read_and_copy instead of just directly de-referencing the user pointer. We also appeared to be missing a re-evaluation of the fds array after the thread block is awoken.
This commit is contained in:
parent
b4a29113e4
commit
7e6fbef8db
3 changed files with 24 additions and 18 deletions
|
@ -231,7 +231,7 @@ public:
|
|||
int sys$minherit(void*, size_t, int inherit);
|
||||
int sys$purge(int mode);
|
||||
int sys$select(const Syscall::SC_select_params*);
|
||||
int sys$poll(const Syscall::SC_poll_params*);
|
||||
int sys$poll(Userspace<const Syscall::SC_poll_params*>);
|
||||
ssize_t sys$get_dir_entries(int fd, void*, ssize_t);
|
||||
int sys$getcwd(Userspace<char*>, ssize_t);
|
||||
int sys$chdir(Userspace<const char*>, size_t);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue