[lkml]   [2005]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread

On Thu, 24 Nov 2005, David Woodhouse wrote:

> I'm looking at implementing ppoll() and pselect(), and the existing
> restartblock stuff isn't sufficient for that -- we don't get to store
> enough args, and although it could possibly be expanded, I just don't
> much like restarting syscalls that way.

What arguments do you need to store?
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.
In the case of nanosleep this could look like this:

if (restart_block) {
expire = restart_block->arg0;
} else {
if (copy_from_user(&t, rqtp, sizeof(t)))
expire = schedule_timeout_interruptible(expire);
if (expire) {
restart_block->arg0 = expire;

AFAICT only the timeout argument needs to saved over a restart, the rest
can be reinitialized from the original arguments.
The main problem would be to prevent an incorrect restart, e.g. if the
debugger pokes around in the registers.

bye, Roman
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-11-25 02:13    [W:0.041 / U:20.880 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site