home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 5 / Amiga Tools 5.iso / tools / developer-tools / aros / source / exec / kernel / src / alert.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-07-16  |  1.6 KB  |  74 lines

  1. /*
  2.     (C) 1995 AROS - The Amiga Replacement OS
  3.     $Id: alert.c 1.1 1995/11/14 22:12:08 digulla Exp digulla $
  4.     $Log: alert.c $
  5.  * Revision 1.1  1995/11/14  22:12:08  digulla
  6.  * Initial revision
  7.  *
  8.     Desc: Alerts the user of a serious problem.
  9.     Lang: english
  10. */
  11. #include <stdio.h>
  12. #include <stdlib.h>
  13. #include "exec_intern.h"
  14.  
  15. /*****************************************************************************
  16.  
  17.     NAME */
  18.     #include <exec/alerts.h>
  19.     #include <clib/exec_protos.h>
  20.  
  21.     __AROS_LH1(void, Alert,
  22.  
  23. /*  SYNOPSIS */
  24.     __AROS_LA(unsigned long, alertNum, D7),
  25.  
  26. /*  LOCATION */
  27.     struct ExecBase *, SysBase, 18, Exec)
  28.  
  29. /*  FUNCTION
  30.     Alerts the user of a serious system problem.
  31.  
  32.     INPUTS
  33.     alertNum - This is a number which contains information about
  34.         the reason for the call.
  35.  
  36.     RESULT
  37.     This routine may return, if the alert is not a dead-end one.
  38.  
  39.     NOTES
  40.     You should not call this routine because it halts the machine,
  41.     displays the message and then may reboot it.
  42.  
  43.     EXAMPLE
  44.     // Dead-End alert: 680x0 Access To Odd Address
  45.     Alert (0x80000003);
  46.  
  47.     BUGS
  48.  
  49.     SEE ALSO
  50.  
  51.     INTERNALS
  52.  
  53.     HISTORY
  54.     26-08-95    digulla created after EXEC-Routine
  55.  
  56. ******************************************************************************/
  57. {
  58.     __AROS_FUNC_INIT
  59.  
  60.     /* since this is an emulation, we just show the bug in the console */
  61.     fprintf (stderr
  62.     , "GURU Meditation %04lx %04lx %s\nTask: %p\n"
  63.     , alertNum >> 16
  64.     , alertNum & 0xFFFF
  65.     , (alertNum & 0x80000000) ? "(DEADEND)" : ""
  66.     , FindTask (NULL)
  67.     );
  68.  
  69.     if (alertNum & 0x80000000)
  70.     exit (20);
  71.  
  72.     __AROS_FUNC_EXIT
  73. } /* Alert */
  74.