/**********************************************************************
 
	Copyright (C) 2003 Hirohisa MORI <joshua@nichibun.ac.jp>
 
	This program is free software; you can redistribute it 
	and/or modify it under the terms of the GLOBALBASE 
	Library General Public License (G-LGPL) as published by 

	http://www.globalbase.org/
 
	This program is distributed in the hope that it will be 
	useful, but WITHOUT ANY WARRANTY; without even the 
	implied warranty of MERCHANTABILITY or FITNESS FOR A 
	PARTICULAR PURPOSE.

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



#include	<stdio.h>
#include	<stdlib.h>
#include	"utils.h"
#include	"task.h"

//#define PANIC_HOLD

HTID (*get_tid_ptr)();

void
er_panic(char * str)
{
	fprintf(stderr,"\n************\n%s (%i)\n************\n",str,
		(int)getpid());

#ifdef PANIC_HOLD
	if ( get_tid_ptr )
		fprintf(stderr,"\n************\n%i\n************\n",
				(*get_tid_ptr)().tid);
	for ( ; ; );
#endif

	printf("%i",*(int*)1);
	exit(1);
}

void
er_panic_x(char * str)
{
	er_panic(str);
}

