I forgot about mentioning Benoit. Shall I add "Signed by" him line or mention that he is the author of most changes?
I am not sure about sys_ioctl - I simply copied it from Benoit's branch. I will look into it. Please see my other comments below. I will submit new patch without pselect to make it less controversial ;-) On Mon, Jan 15, 2018 at 4:37 AM, Nadav Har'El <n...@scylladb.com> wrote: > > On Mon, Jan 15, 2018 at 11:02 AM, Nadav Har'El <n...@scylladb.com> wrote: > >> >> >> + >>> +static int pselect6(int nfds, fd_set *readfds, fd_set *writefds, >>> + fd_set *exceptfds, const struct timespec *timeout_ts, >>> + void *sig) >>> +{ >>> + const sigset_t *sigmask = NULL; >>> + if(sig) { >>> + debug_always("pselect6(): unimplemented with not-null >>> sigmask\n"); >>> + errno = ENOSYS; >>> + return -1; >>> + } >>> >> >> Why didn't you just take a sigset_t *sig and pass it on to pselect()? >> Why was it important to check that sig==0? >> > > I think I figured it out... Acording to select(2), > > > > > > > > > > > > > > > *The final argument of the pselect6() system call is not a sigset_t > * pointer, but is instead a structure of the form: struct > { const kernel_sigset_t *ss; /* Pointer to signal set > */ size_t ss_len; /* Size (in bytes) of > object pointed to by 'ss' > */ }; This allows the system call to obtain both a pointer > to the signal set and its size, while allowing for the fact that > most architectures sup‐ port a maximum of 6 arguments to a system > call. See sigprocmask(2) for a discussion of the difference > between the kernel and libc notion of the signal set.* > > Perhaps you should mention this in a comment explaining why we're defering > implementing this to later? > > Essentially I did not feel like implementing it as it was not needed by golang so I simply wanted to indicate that part was not implemented. Also as I understand pselect is not as widely used as new epoll. Above all I am focused to getting golang supported so I did not want to spend extra time figuring this part of the pselect implementation. -- You received this message because you are subscribed to the Google Groups "OSv Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to osv-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.