a question of error codes
Jonathan S. Shapiro
Tue, 21 Apr 1998 20:00:31 -0400
If a segment keeper is unable to satisfy a fault, it passes the buck
to the domain keeper.
Should the domain keeper receive the same fault code that the segment
keeper got, or should it perhaps receive a fault code set by the
In the current EROS design, the segment keeper passes the buck by
invoking the restart key with a nonzero value. The value, if
non-zero, becomes the process fault code. The fact of having a
non-zero fault code causes the domain keeper to be invoked.
At the moment, the segment keeper invokes the restart key with the
result code from the space bank (e.g. RC_NoMorePages). It could as
easily use the fault code that was passed to it in the first place
(e.g. FC_InvalidAccess) The domain keeper therefore sees the fault
code as RC_NoMorePages rather than as FC_InvalidAccess.
There is no overlap in the encodings between fault codes and result
codes under the current design.
Is this correct, or should the segment keeper pass the original fault
code to the domain keeper?
An alternative is to dedicate a pseudo register to hold the order code
from the last time a fault key was invoked, and pass this pseudo
register to the domain keeper as part of the register set. This
preserves both the fault code and the reason for passing the buck.
Pros and cons on that last? It's a very easy change.