lkml.org 
[lkml]   [2005]   [Nov]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: RFC: Kill -ERESTART_RESTARTBLOCK.
Hi,

On Fri, 25 Nov 2005, David Woodhouse wrote:

> > Instead of messing with the signal delivery it may be better to slightly
> > change the restart logic. Instead of calling a separate function, we could
> > call the original function with all the arguments, which would reduce the
> > state required to be saved.
> < ... >
> > AFAICT only the timeout argument needs to saved over a restart, the rest
> > can be reinitialized from the original arguments.
>
> Yeah, that might be nice -- but if the argument registers are
> call-clobbered, then those original arguments don't actually exist
> anywhere any more, except in the syscall function which got interrupted.

The arguments have to be saved somewhere, otherwise ERESTARTNOHAND
wouldn't work, so my basic idea would be to change ERESTART_RESTARTBLOCK
into ERESTARTNOHAND + some extra state.

> One simpler option which _might_ work for pselect(), ppoll() and
> sigsuspend() is a TIF_RESTORE_SIGMASK flag which restores the original
> signal mask on the way back to userspace but _after_ calling do_signal()
> with the temporary mask.

Now I see the problem with the signal mask and I agree, this would be a
simpler and IMO preferable approach.

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

\
 
 \ /
  Last update: 2005-11-25 16:27    [W:0.058 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site