-- Transactions>SpecialTransaction.mesa (last edited by Gobbel on September 25, 1980 1:59 PM)
-- The items in this interface are intended to assist in debugging both transaction clients, and the transaction facility itself. They are not for use other than debugging.
-- How this is supposed to work:
-- The transaction facility calls optionalCrash (if non-NIL) at various key places in its code. optionalCrash may then crash or not, as it sees fit. The parameter unimportance is supplied as a hint indicating the relative "interestingness" of the point from which optionalCrash was called. Warning: Since optionalCrash is called from deep within the transaction machinery, it should not attempt to call any Pilot operations in making its decision, as this may result in deadlock.
SpecialTransaction: DEFINITIONS =
BEGIN
ClientStart: PROCEDURE;
-- To be exported by transaction client: If this procedure is bound, starts client before transaction crash recovery, so he can execute SetCrashProcedure.
SetCrashProcedure: PROCEDURE [optionalCrash: OptionalCrash ← NullProc];
-- optionalCrash will be called at critical points in the transaction code. The OptionlCrash takes an Unimportance as argument, which it may use as a hint in deciding whether or not to crash at that point.
NullProc: OptionalCrash;
-- does nothing, causes a call to SetCrashProcedure with no argument to effectively disable the bomb facility.
OptionalCrash: TYPE = PROCEDURE [unimportance: Unimportance];
Unimportance: TYPE = CARDINAL [1..LAST[CARDINAL]];
END.
LOG
September 25, 1980 11:56 AMGobbelCreate file.