Hi,
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:
sys_nanosleep()
{
...
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;
ret = -ERESTART_RESTARTBLOCK;
}
}
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]