Cancel redefinition of DOSBase for the 'cdrom' test utility. Now the
[AROS.git] / rom / kernel / displayalert.c
blob5ad1b380a80198afc97d5b870e11855bdbd4b7f3
1 /*
2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 */
8 #include <aros/kernel.h>
9 #include <aros/libcall.h>
11 #include <kernel_base.h>
12 #include <kernel_debug.h>
14 /*****************************************************************************
16 NAME */
17 #include <proto/kernel.h>
19 AROS_LH2(void, KrnDisplayAlert,
21 /* SYNOPSIS */
22 AROS_LHA(uint32_t, code, D0),
23 AROS_LHA(const char *, text, A0),
25 /* LOCATION */
26 struct KernelBase *, KernelBase, 35, Kernel)
28 /* FUNCTION
29 Inform the user about critical system failure.
31 INPUTS
32 code - Corresponding alert code.
33 text - A NULL-terminated text to print out.
35 First three lines are assumed to be a header. Some implementations
36 may print them centered inside a frame.
38 RESULT
39 None. This function is not guaranteed to return.
41 NOTES
42 This function exists for system internal purposes. Please do not
43 call it from within regular applications! In 99% of cases this function
44 will halt or reboot the machine. Certain structures in RAM, as well as
45 video hardware state, will be irreversibly destroyed.
47 'code' parameter is passed for convenience. Based on it, the system
48 can make a decision to log the alert in debug output and continue,
49 instead of displaying a message and halting.
51 This function is currently experimental. Its definition may change.
53 EXAMPLE
55 BUGS
57 SEE ALSO
59 INTERNALS
61 ******************************************************************************/
63 AROS_LIBFUNC_INIT
66 * This is a generic version that simply formats the text into debug log.
67 * It can be replaced with machine-specific implementation which can do more.
69 krnDisplayAlert(text, KernelBase);
71 AROS_LIBFUNC_EXIT