Rev 3 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | pj | 1 | /* |
2 | * Project: S.Ha.R.K. |
||
3 | * |
||
4 | * Coordinators: |
||
5 | * Giorgio Buttazzo <giorgio@sssup.it> |
||
6 | * Paolo Gai <pj@gandalf.sssup.it> |
||
7 | * |
||
8 | * Authors : |
||
9 | * Massimiliano Giorgi <massy@gandalf.sssup.it> |
||
10 | * (see the web pages for full authors list) |
||
11 | * |
||
12 | * ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy) |
||
13 | * |
||
14 | * http://www.sssup.it |
||
15 | * http://retis.sssup.it |
||
16 | * http://shark.sssup.it |
||
17 | */ |
||
18 | |||
19 | /* |
||
20 | * Copyright (C) 1999 Massimiliano Giorgi |
||
21 | * |
||
22 | * This program is free software; you can redistribute it and/or modify |
||
23 | * it under the terms of the GNU General Public License as published by |
||
24 | * the Free Software Foundation; either version 2 of the License, or |
||
25 | * (at your option) any later version. |
||
26 | * |
||
27 | * This program is distributed in the hope that it will be useful, |
||
28 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
29 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
30 | * GNU General Public License for more details. |
||
31 | * |
||
32 | * You should have received a copy of the GNU General Public License |
||
33 | * along with this program; if not, write to the Free Software |
||
34 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
||
35 | * |
||
36 | */ |
||
37 | |||
38 | /* |
||
39 | * CVS : $Id: assert.c,v 1.1.1.1 2002-03-29 14:12:51 pj Exp $ |
||
40 | * |
||
41 | * File: $File$ |
||
42 | * Revision: $Revision: 1.1.1.1 $ |
||
43 | * Last update: $Date: 2002-03-29 14:12:51 $ |
||
44 | */ |
||
45 | |||
46 | #include <ll/i386/cons.h> |
||
1689 | fabio | 47 | #include <arch/stdarg.h> |
48 | #include <arch/string.h> |
||
49 | #include <arch/stdio.h> |
||
2 | pj | 50 | #include <kernel/func.h> |
51 | #include <kernel/var.h> |
||
52 | #include <kernel/assert.h> |
||
53 | |||
54 | void _failed_assertk(char *test,char *filename, int line) |
||
55 | { |
||
56 | sys_panic("assertion %s failed in %s at line %i (task:%i_%i)\n", |
||
57 | test,filename,line,0,(int)exec_shadow); |
||
58 | } |
||
59 | |||
60 | void _failed_magic_assert(char *filename, int line, char *fmt, ...) |
||
61 | { |
||
62 | static char buffer[1024]; /* DANGER!!! */ |
||
63 | va_list ap; |
||
64 | |||
65 | va_start(ap,fmt); |
||
66 | vsprintf(buffer,(char*)fmt,ap); |
||
67 | va_end(ap); |
||
68 | |||
69 | sys_panic("MAGIC assertion failed in %s at line %i (task:%i_%i): %s\n", |
||
70 | filename,line,0,exec,buffer); |
||
71 | } |