sim.h
1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*
* Copyright (C) 1996-1998 by the Board of Trustees
* of Leland Stanford Junior University.
*
* This file is part of the SimOS distribution.
* See LICENSE file for terms of the license.
*
*/
/*
* sim.h - Common included file used for simulated machine.
*
*/
#ifndef SIM_H
#define SIM_H
#define _BSD_SIGNALS
#include <sys/time.h>
#include <signal.h>
#ifndef __alpha
#include <sys/types.h>
#endif
#include <sys/stat.h>
#include <fcntl.h>
/*
* ANSI C prototype support and backward compat macros.
*/
#if defined(__STDC__) || defined(_LANGUAGE_C_PLUS_PLUS)
#define _ARGS_(x) x
#else
#define _ARGS_(x) ()
#endif
#ifndef SIMBASEADDR
#define SIMBASEADDR 0x78000000
#endif
/*
* Error routines.
*/
extern void Sim_Error _ARGS_((char *msg));
extern void Sim_Warning _ARGS_((char *fmt, ...));
#define SIMASSERT(x) {if (!(x)) {Sim_Warning("%s:%d: assertion failed: %s", \
__FILE__, __LINE__, # x); \
Sim_Error("ASSFAIL");}}
#endif /* SIM_H */