2005-04-21 16:53:53 +02:00
|
|
|
#include "syslib.h"
|
|
|
|
#include <stdarg.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
|
2012-03-25 20:25:53 +02:00
|
|
|
int sys_abort(int how, ...)
|
2005-04-21 16:53:53 +02:00
|
|
|
{
|
|
|
|
/* Something awful has happened. Abandon ship. */
|
|
|
|
|
|
|
|
message m;
|
|
|
|
va_list ap;
|
|
|
|
|
|
|
|
va_start(ap, how);
|
|
|
|
if ((m.ABRT_HOW = how) == RBT_MONITOR) {
|
2006-03-03 10:44:55 +01:00
|
|
|
m.ABRT_MON_ENDPT = va_arg(ap, int);
|
2005-04-21 16:53:53 +02:00
|
|
|
m.ABRT_MON_ADDR = va_arg(ap, char *);
|
|
|
|
m.ABRT_MON_LEN = va_arg(ap, size_t);
|
|
|
|
}
|
|
|
|
va_end(ap);
|
|
|
|
|
2010-02-09 16:20:09 +01:00
|
|
|
return(_kernel_call(SYS_ABORT, &m));
|
2005-04-21 16:53:53 +02:00
|
|
|
}
|