2005-04-21 16:53:53 +02:00
|
|
|
#include "utils.h"
|
|
|
|
|
|
|
|
/*===========================================================================*
|
2005-06-01 16:31:00 +02:00
|
|
|
* panic *
|
2005-04-21 16:53:53 +02:00
|
|
|
*===========================================================================*/
|
2005-06-01 16:31:00 +02:00
|
|
|
PUBLIC void panic(who, mess, num)
|
2005-04-21 16:53:53 +02:00
|
|
|
char *who; /* server identification */
|
|
|
|
char *mess; /* message format string */
|
|
|
|
int num; /* number to go with format string */
|
|
|
|
{
|
|
|
|
/* Something awful has happened. Panics are caused when an internal
|
|
|
|
* inconsistency is detected, e.g., a programming error or illegal
|
|
|
|
* value of a defined constant.
|
|
|
|
*/
|
|
|
|
message m;
|
|
|
|
|
|
|
|
if (NULL != who && NULL != mess) {
|
|
|
|
if (num != NO_NUM) {
|
|
|
|
printf("Panic in %s: %s: %d\n", who, mess, num);
|
|
|
|
} else {
|
|
|
|
printf("Panic in %s: %s\n", who, mess);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
m.m_type = SYS_EXIT;
|
|
|
|
m.EXIT_STATUS = 1;
|
|
|
|
_taskcall(SYSTASK, SYS_EXIT, &m);
|
|
|
|
/* never reached */
|
|
|
|
}
|
|
|
|
|