2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
5 Desc: Display an alert in supervisor mode.
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
)
26 D(bug("[SystemAlert] Code 0x%08X, type %d, data 0x%p\n", alertNum
, type
, data
));
29 buf
= Alert_AddString(PrivExecBase(SysBase
)->AlertBuffer
, Alert_GetTitle(alertNum
));
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
);