export.h
2.4 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/*
* Copyright (C) 1998 by the Board of Trustees
* of Leland Stanford Junior University.
* Copyright (C) 1998 Digital Equipment Corporation
*
* This file is part of the SimOS distribution.
* See LICENSE file for terms of the license.
*
*/
#ifndef _EXPORT_H_
#define _EXPORT_H_
/*
* Definitions of exported global variables.
*/
#include <stdio.h>
#include "event.h"
#include "macros.h"
/* The maximum number of processes that can be simulated. This is used
* to allocate space. This value can be changed with the "-p" command
* line option up to a maximum of MAXPROC.
*/
extern int max_nprocs;
/* The absolute maximum number of processes that can be simulated. */
#define MAXPROC 256
/* the number of existing processes */
extern int nprocs;
/* the maximum process id ever used (process ids start at zero) */
extern int max_pid;
/*
* The file descriptor used by AINT for its output. Can be assigned by
* the user program. Defaults to stderr. If NULL, no output from MINT
* is generated.
*/
extern FILE *aint_output;
/*
* Ckpoint_freq controls the frequency of calls to sim_checkpoint().
* This can be set on the command line as well as changed by the user while
* the program is running. If set to zero, no further calls to sim_checkpoint()
* will occur.
*/
extern unsigned int ckpoint_freq;
/* If true, then the simulator must supply a value on a read by using
* the pointer "value" in the event structure to write the value that
* should be used. On a write, the "value" pointer points to the value
* being written by the object program. This flag is set by the "-V"
* command line option.
*
extern int Verify_protocol; */
/* If true, then the simulator must explicitly release a lock or
* semaphore by calling RC_unlock() and RC_vsema().
*
extern int Release_consist; */
/* If true, then a connection to a remote client has been established
extern int Connection_established; */
/* If true, then an optimization is enabled where the back-end function
* prmcache_read() is called to determined if a reschedule should occur.
* An event pointer is passed in as the only argument. A return value
* of 0 means "no reschedule"; any other return value means "reschedule".
* Similarly for prmcache_write(). These variables default to zero and
* must be set to 1 in sim_init() in order to enable this optimization.
*
extern int Use_prmcache_read;
extern int Use_prmcache_write; */
#endif /* _EXPORT_H_ */