Re: [patch 0/6] sys_indirect RFC - sys_indirect introduction

From: Davide Libenzi
Date: Sat Jun 30 2007 - 18:32:46 EST


On Sat, 30 Jun 2007, Davide Libenzi wrote:

> Think about if we had this for the latest pselect/ppoll/epoll_pwait.
> Think about how your solution and mine would apply to that very much
> concrete case.

This is how all those overloaded syscalls looks like, BTW:

if (sigmask) {
if (sigsetsize != sizeof(sigset_t))
return -EINVAL;
if (copy_from_user(&ksigmask, sigmask, sizeof(ksigmask)))
return -EFAULT;
sigdelsetmask(&ksigmask, sigmask(SIGKILL) | sigmask(SIGSTOP));
sigprocmask(SIG_SETMASK, &ksigmask, &sigsaved);
}
error = sys_XXX(...);
if (sigmask) {
if (error == -EINTR) {
memcpy(&current->saved_sigmask, &sigsaved,
sizeof(sigsaved));
set_thread_flag(TIF_RESTORE_SIGMASK);
} else
sigprocmask(SIG_SETMASK, &sigsaved, NULL);
}

How would you do that with a single shared strcture, w/out adding in all
signal paths the knowledge of the structure?



- Davide


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/