Re: Math emulator

From: Andrew Valencia <vandys_at_nospam.org>
Date: Tue Oct 19 1993 - 08:28:14 PDT

[Peter Holzer <hp@petrus.vmars.tuwien.ac.at> writes:]

>Not really. The system call which is called by signal, sigaction, ...
>needs to pass two addresses to the kernel: The one of the signal handler
>and one of a function which does the cleaning up.

Your technique works, although it takes more storage per signal, and it
moves a value for each signal interaction which is basically invariant
for the life of a given process image. Optimizations of this data motion
have caused problems at HP--consider vfork(), and how it can interact
with process data structures which might flag optimization. I had to
fix one of these while doing kernels at HP--details on request.

However, I want to sensitize readers that Plan9 and VSTa signal handling
is not done using such a monolithic kernel technique. The kernel does
not keep per-signal state handling (in fact, in VSTa, "signals" are
actually strings). A process has a single vector, and does signal
handling, handler invocation, etcetera, within the process image itself.
Thus, the issue of "trampoline" code becomes moot because this level of
code has moved into the process image, where it can know whatever per-
process symbol values it needs.

I think I could emulate POSIX signals using this mechanism. The APE
(ANSI Posix Environment) of Plan9 also seems to have done it starting
from the same mechanism.

                                        Andy
Received on Tue Oct 19 08:36:48 1993

This archive was generated by hypermail 2.1.8 : Wed Sep 21 2005 - 19:37:12 PDT