Fix IO memory access .. SB128 driver makes noises in VMWare - CMI is untested (Curren...
[AROS.git] / rom / exec / systemalert.c
blobe684f891138c3236814699d4eb4da5bb898508d3
1 /*
2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Display an alert in supervisor mode.
6 Lang: english
7 */
9 #include <aros/debug.h>
10 #include <exec/execbase.h>
11 #include <proto/kernel.h>
13 #include "exec_intern.h"
14 #include "exec_util.h"
17 * Display an alert via kernel.resource. This is called in a critical, hardly recoverable condition.
18 * Interrupts and multitasking are disabled here.
20 * Note that we use shared buffer in SysBase for alert text.
22 void Exec_SystemAlert(ULONG alertNum, APTR location, APTR stack, UBYTE type, APTR data, struct ExecBase *SysBase)
24 char *buf;
26 D(bug("[SystemAlert] Code 0x%08X, type %d, data 0x%p\n", alertNum, type, data));
28 /* Get the title */
29 buf = Alert_AddString(PrivExecBase(SysBase)->AlertBuffer, Alert_GetTitle(alertNum));
30 *buf++ = '\n';
32 D(bug("[SystemAlert] Got title: %s\n", PrivExecBase(SysBase)->AlertBuffer));
34 /* Get the alert text */
35 buf = FormatAlert(buf, alertNum, SysBase->ThisTask, location, type, SysBase);
36 FormatAlertExtra(buf, stack, type, data, SysBase);
38 /* Display an alert via kernel.resource */
39 KrnDisplayAlert(alertNum, PrivExecBase(SysBase)->AlertBuffer);