home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / amiga / os / kludge03.tz / kludge03 / mk74 / user / libmach / panic.c < prev    next >
C/C++ Source or Header  |  1992-02-26  |  2KB  |  62 lines

  1. /* 
  2.  * Mach Operating System
  3.  * Copyright (c) 1991,1990,1989 Carnegie Mellon University
  4.  * All Rights Reserved.
  5.  * 
  6.  * Permission to use, copy, modify and distribute this software and its
  7.  * documentation is hereby granted, provided that both the copyright
  8.  * notice and this permission notice appear in all copies of the
  9.  * software, derivative works or modified versions, and any portions
  10.  * thereof, and that both notices appear in supporting documentation.
  11.  * 
  12.  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
  13.  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
  14.  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
  15.  * 
  16.  * Carnegie Mellon requests users of this software to return to
  17.  * 
  18.  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
  19.  *  School of Computer Science
  20.  *  Carnegie Mellon University
  21.  *  Pittsburgh PA 15213-3890
  22.  * 
  23.  * any improvements or extensions that they make and grant Carnegie Mellon
  24.  * the rights to redistribute these changes.
  25.  */
  26. /*
  27.  * HISTORY
  28.  * $Log:    panic.c,v $
  29.  * Revision 2.2  92/02/20  15:58:04  elf
  30.  *     Created from bootstrap's version.
  31.  *     [92/02/11            rpd]
  32.  * 
  33.  */
  34.  
  35. #include <mach/port.h>
  36. #include <varargs.h>
  37.  
  38. static mach_port_t master_host_port;
  39.  
  40. panic_init(port)
  41.     mach_port_t port;
  42. {
  43.     master_host_port = port;
  44. }
  45.  
  46. /*VARARGS1*/
  47. panic(s, va_alist)
  48.     char *s;
  49.     va_dcl
  50. {
  51.     va_list listp;
  52.  
  53.     printf("panic: ");
  54.     va_start(listp);
  55.     vprintf(s, listp);
  56.     va_end(listp);
  57.     printf("\n");
  58.  
  59. #define RB_DEBUGGER    0x1000    /* enter debugger NOW */
  60.     (void) host_reboot(master_host_port, RB_DEBUGGER);
  61. }
  62.