| 99 |
theseven |
1 |
//
|
|
|
2 |
//
|
|
|
3 |
// Copyright 2010 TheSeven
|
|
|
4 |
//
|
|
|
5 |
//
|
|
|
6 |
// This file is part of emBIOS.
|
|
|
7 |
//
|
|
|
8 |
// emBIOS is free software: you can redistribute it and/or
|
|
|
9 |
// modify it under the terms of the GNU General Public License as
|
|
|
10 |
// published by the Free Software Foundation, either version 2 of the
|
|
|
11 |
// License, or (at your option) any later version.
|
|
|
12 |
//
|
|
|
13 |
// emBIOS is distributed in the hope that it will be useful,
|
|
|
14 |
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
15 |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
16 |
// See the GNU General Public License for more details.
|
|
|
17 |
//
|
|
|
18 |
// You should have received a copy of the GNU General Public License along
|
|
|
19 |
// with emBIOS. If not, see <http://www.gnu.org/licenses/>.
|
|
|
20 |
//
|
|
|
21 |
//
|
|
|
22 |
|
|
|
23 |
|
|
|
24 |
#ifndef __SYSCALLAPI_H__
|
|
|
25 |
#define __SYSCALLAPI_H__
|
|
|
26 |
|
|
|
27 |
|
|
|
28 |
#include <stdint.h>
|
|
|
29 |
#include <stdarg.h>
|
|
|
30 |
#include <stdbool.h>
|
|
|
31 |
|
|
|
32 |
|
|
|
33 |
#ifndef PANIC_SEVERITY_DEFINED
|
|
|
34 |
#define PANIC_SEVERITY_DEFINED
|
|
|
35 |
enum panic_severity
|
|
|
36 |
{
|
|
|
37 |
PANIC_KILLTHREAD = 0,
|
|
|
38 |
PANIC_KILLUSERTHREADS = 1,
|
|
|
39 |
PANIC_FATAL = 2
|
|
|
40 |
};
|
|
|
41 |
#endif
|
|
|
42 |
|
|
|
43 |
|
|
|
44 |
/* increase this every time the api struct changes */
|
|
|
45 |
#define EMBIOS_API_VERSION 0
|
|
|
46 |
|
|
|
47 |
/* update this to latest version if a change to the api struct breaks
|
|
|
48 |
backwards compatibility (and please take the opportunity to sort in any
|
|
|
49 |
new function which are "waiting" at the end of the function table) */
|
|
|
50 |
#define EMBIOS_MIN_API_VERSION 0
|
|
|
51 |
|
|
|
52 |
/* NOTE: To support backwards compatibility, only add new functions at
|
|
|
53 |
the end of the structure. Every time you add a new function,
|
|
|
54 |
remember to increase EMBIOS_API_VERSION. If you make changes to the
|
|
|
55 |
existing APIs, also update EMBIOS_MIN_API_VERSION to current version */
|
|
|
56 |
|
|
|
57 |
struct embios_syscall_table
|
|
|
58 |
{
|
|
|
59 |
void (*panic) (enum panic_severity severity, const char* string);
|
|
|
60 |
void (*panicf) (enum panic_severity severity, const char* fmt, ...);
|
|
|
61 |
};
|
|
|
62 |
|
|
|
63 |
|
|
|
64 |
#endif
|