Upgraded GRUB2 to 2.00 release.
[AROS.git] / compiler / clib / __assert_kernel.c
blob12fd3c1bdabbbf378bc10b92ae92c058f6be9280
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: assert() function for the kernel.
6 Lang: english
7 */
8 #include <exec/execbase.h>
9 #include <exec/alerts.h>
10 #include <proto/exec.h>
11 #include <assert.h>
12 #include <aros/arossupportbase.h>
14 extern struct ExecBase *SysBase;
16 void __assert (const char * expr, const char * file, unsigned int line)
18 /* TODO: Make this call the kernel.resource KernelAssertFail() fn */
20 /* Awkward, but I need a global SysBase variable */
21 struct AROSSupportBase *AROSSupportBase;
23 AROSSupportBase = (struct AROSSupportBase *)SysBase->DebugData;
25 /* Basically, this is the body of an KASSERT() */
26 AROSSupportBase->kprintf("\x07%s::%ld: assertion failed: %s\n",
27 file, line, expr);
29 Alert(AG_BadParm);
30 } /* assert */