* [parisc-linux] signal.c, etc
@ 2000-12-17 19:41 David Huggins-Daines
2000-12-20 9:14 ` Richard Hirst
0 siblings, 1 reply; 2+ messages in thread
From: David Huggins-Daines @ 2000-12-17 19:41 UTC (permalink / raw)
To: rhirst; +Cc: parisc-linux
Hi,
Just reading through the archives, I noticed you came upon my rather
hackish IAOQ manipulation in signal.c.
If you guys need any explanation about the intent of that code please
ask me. (I'm back on the parisc-linux list now, BTW)
I freely admit that it is bogus (in fact that's why the comment was
there), not because I didn't know which part of IAOQ was front and
which was back, but because:
(a) There are two different signal exit paths, one from interruptions,
one from system calls. This complicates things *tremendously*.
However, exiting from a signal handler always goes via system
calls, and in that case, the stored IAOQ values are meaningless.
I probably should have removed all the meaningless frobbings of
the stored IAOQ, but ... well ... time passes, you become occupied
elsewhere, etc.
(b) I don't understand what the processor actually does when you
restore IAOQ on exit from an interruption. The HP documentation
is not written in a particularly lucid manner.
(c) Setting iaoq_back to iaoq_front + 4 is *not* the right answer
because you may have taken an interruption in a branch, or an insn
may have been nullified, etc.
(d) I had about ten billion other things to do at the time and was
under lots of pressure to get "more important things" working...
--
David Huggins-Daines - dhd@eradicator.org
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [parisc-linux] signal.c, etc
2000-12-17 19:41 [parisc-linux] signal.c, etc David Huggins-Daines
@ 2000-12-20 9:14 ` Richard Hirst
0 siblings, 0 replies; 2+ messages in thread
From: Richard Hirst @ 2000-12-20 9:14 UTC (permalink / raw)
To: David Huggins-Daines; +Cc: parisc-linux
Hi Dave,
On Sun, Dec 17, 2000 at 02:41:39PM -0500, David Huggins-Daines wrote:
> Hi,
>
> Just reading through the archives, I noticed you came upon my rather
> hackish IAOQ manipulation in signal.c.
>
> If you guys need any explanation about the intent of that code please
> ask me. (I'm back on the parisc-linux list now, BTW)
Welcome back! Feel free to fix anything I broke.
> I freely admit that it is bogus (in fact that's why the comment was
> there), not because I didn't know which part of IAOQ was front and
> which was back, but because:
>
> (a) There are two different signal exit paths, one from interruptions,
> one from system calls. This complicates things *tremendously*.
> However, exiting from a signal handler always goes via system
> calls, and in that case, the stored IAOQ values are meaningless.
> I probably should have removed all the meaningless frobbings of
> the stored IAOQ, but ... well ... time passes, you become occupied
> elsewhere, etc.
Right, the code as was worked ok for the syscall case but broke
for the interrupt case. The problem is that following the signal
and call to sys_rt_sigreturn, you need to return to userland either
via an interrupt return path, or a syscall return path, depending on
where you were when the signal occurred. There is now a test in
syscall.S for __NR_rt_sigreturn in order to implement that.
> (b) I don't understand what the processor actually does when you
> restore IAOQ on exit from an interruption. The HP documentation
> is not written in a particularly lucid manner.
>
> (c) Setting iaoq_back to iaoq_front + 4 is *not* the right answer
> because you may have taken an interruption in a branch, or an insn
> may have been nullified, etc.
Absolutely - that was the main problem with the code as it was.
Seting iaoq_back to iaoq_front + 4 is valid if you are starting up the
signal handler, and should be ok if the singal occurred while you
were blocked on a syscall.
> (d) I had about ten billion other things to do at the time and was
> under lots of pressure to get "more important things" working...
Sure - the current code does work for me under various test cases, but
it did take days to get to that point.
Richard
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-12-20 9:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-12-17 19:41 [parisc-linux] signal.c, etc David Huggins-Daines
2000-12-20 9:14 ` Richard Hirst
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.