1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 #if !defined(_DPS8_SYS_H)
20 # define _DPS8_SYS_H
21
22 # include <uv.h>
23 # include "uvutil.h"
24
25
26 typedef struct
27 {
28
29 struct
30 {
31 volAtomic int connect;
32
33
34
35 } iom_times;
36
37
38
39
40
41
42 volAtomic bool no_color;
43 volAtomic uint sys_poll_interval;
44 volAtomic uint sys_slow_poll_interval;
45 volAtomic uint sys_poll_check_rate;
46 bool nosync;
47 } sysinfo_t;
48
49 # if defined(THREADZ) || defined(LOCKLESS)
50 extern volAtomic bool syncClockMode;
51 extern volAtomic uint syncClockModeMasterIdx;
52 # endif
53
54 # if defined(THREADZ) || defined(LOCKLESS)
55 # define DO_WORK \
56 do { \
57 cpu.rTRticks ++; \
58 if (cpu.syncClockModeCache) \
59 cpu.workAllocation --; \
60 } while (0)
61 # else
62 # define DO_WORK \
63 do { \
64 cpu.rTRticks ++; \
65 } while (0)
66 # endif
67
68 # if defined(TR_WORK_EXEC)
69 # define DO_WORK_EXEC DO_WORK
70 # else
71 # define DO_WORK_EXEC
72 # endif
73
74 # if defined(TR_WORK_MEM)
75 # define DO_WORK_MEM DO_WORK
76 # else
77 # define DO_WORK_MEM
78 # endif
79
80 # if defined(DBGEVENT)
81 # define max_dbgevents 128u
82 # define dbgevent_tagsize 128
83 struct dbgevent_t
84 {
85 word15 segno;
86 word18 offset;
87 bool t0;
88 char tag[dbgevent_tagsize];
89 };
90
91 extern uint n_dbgevents;
92 extern struct dbgevent_t dbgevents[max_dbgevents];
93 extern struct timespec dbgevent_t0;
94 int dbgevent_lookup (word15 segno, word18 offset);
95 # endif
96
97 extern volAtomic word36 * M;
98 extern sysinfo_t sys_opts;
99 extern uint64 sim_deb_start;
100 extern uint64 sim_deb_stop;
101 extern uint64 sim_deb_break;
102 # define DEBUG_SEGNO_LIMIT 1024
103 extern bool sim_deb_segno_on;
104 extern bool sim_deb_segno[DEBUG_SEGNO_LIMIT];
105 # define NO_SUCH_RINGNO ((uint64) -1ll)
106 extern uint64 sim_deb_ringno;
107 extern uint64 sim_deb_skip_limit;
108 extern uint64 sim_deb_mme_cntdwn;
109 extern uint64 sim_deb_skip_cnt;
110 extern bool sim_deb_bar;
111 extern DEVICE *sim_devices[];
112 extern uint dbgCPUMask;
113 extern bool breakEnable;
114
115 char * lookup_address (word18 segno, word18 offset, char * * compname, word18 * compoffset);
116 void list_source (char * compname, word18 offset, uint dflag);
117
118
119 t_stat brkbrk (int32 arg, const char * buf);
120 extern int32 luf_flag;
121
122 #endif