/
MudOS_0.9.19/bin/
MudOS_0.9.19/doc/concepts/
MudOS_0.9.19/doc/driver/
MudOS_0.9.19/doc/efuns/bitstrings/
MudOS_0.9.19/doc/efuns/buffers/
MudOS_0.9.19/doc/efuns/communication/
MudOS_0.9.19/doc/efuns/core/
MudOS_0.9.19/doc/efuns/mappings/
MudOS_0.9.19/doc/efuns/math/
MudOS_0.9.19/doc/efuns/security/
MudOS_0.9.19/doc/lpc/constructs/
MudOS_0.9.19/doc/lpc/types/
MudOS_0.9.19/doc/platforms/
MudOS_0.9.19/etc/
MudOS_0.9.19/mudlib/
MudOS_0.9.19/mudlib/lil/
MudOS_0.9.19/mudlib/lil/clone/
MudOS_0.9.19/mudlib/lil/command/
MudOS_0.9.19/mudlib/lil/data/
MudOS_0.9.19/mudlib/lil/etc/
MudOS_0.9.19/mudlib/lil/include/
MudOS_0.9.19/mudlib/lil/inherit/
MudOS_0.9.19/mudlib/lil/inherit/master/
MudOS_0.9.19/mudlib/lil/log/
MudOS_0.9.19/mudlib/lil/single/
MudOS_0.9.19/mudlib/lil/u/
MudOS_0.9.19/src/testsuite/
MudOS_0.9.19/src/testsuite/clone/
MudOS_0.9.19/src/testsuite/command/
MudOS_0.9.19/src/testsuite/data/
MudOS_0.9.19/src/testsuite/etc/
MudOS_0.9.19/src/testsuite/include/
MudOS_0.9.19/src/testsuite/inherit/
MudOS_0.9.19/src/testsuite/inherit/master/
MudOS_0.9.19/src/testsuite/log/
MudOS_0.9.19/src/testsuite/single/
MudOS_0.9.19/src/testsuite/single/efuns/
MudOS_0.9.19/src/testsuite/u/
/* hosts/amiga/signal_rr.c
**
** Just the exception catcher -- it need registerized args (-mRR) which
** are note used elsewhere.
**
**   28-Feb-93 [lars]  Done for DICE 2.07.53
*/

#include <exec/types.h>
#ifdef INCLUDE_VERSION
#include <dos/dos.h>
#else
#include <libraries/dos.h>
#endif
#include "amiga.h"
extern __stkargs ULONG SetSignal( unsigned long newSignals, unsigned long signalSet );
/*#include "nsignal.h"*/


/*-----------------------------------------------------------------------*/

extern ULONG sys_signal_alarm,	/* The system-signal-masks */
	     sys_signal_hup,
	     sys_signal_usr;

extern void (*handler_hup)(void), (*handler_alarm)(void), (*handler_usr)(void);

/*-----------------------------------------------------------------------
** ULONG catch_exception (ULONG mask)
**
**   Called by the OS if the task gets an exception, this dispatch to
**   the approbiate signal-function.
**   Note that the std-raise() also removes the handler, so our functions
**   are called by hand.
*/

__regargs __geta4 ULONG catch_exception( __D0 ULONG mask) {
    /* Handle our special exceptions */
  if (mask & sys_signal_alarm) (*handler_alarm)();
  if (mask & sys_signal_hup) (*handler_hup)();
  if (mask & sys_signal_usr) (*handler_usr)();
    /* Stop select() anyway */
  SetSignal(EXT_SIGINT, EXT_SIGINT);
  return mask;
}

/*************************************************************************/