File: globals.c

package info (click to toggle)
xpvm 1.2.5-11
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,368 kB
  • ctags: 1,509
  • sloc: ansic: 22,799; tcl: 7,750; makefile: 101; csh: 11; sh: 10
file content (450 lines) | stat: -rw-r--r-- 6,669 bytes parent folder | download | duplicates (5)
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450

static char rcsid[] =
	"$Id: globals.c,v 4.50 1998/04/09 21:12:16 kohl Exp $";

/*
 *         XPVM version 1.1:  A Console and Monitor for PVM
 *           Oak Ridge National Laboratory, Oak Ridge TN.
 *           Authors:  James Arthur Kohl and G. A. Geist
 *                   (C) 1994 All Rights Reserved
 *
 *                              NOTICE
 *
 * Permission to use, copy, modify, and distribute this software and
 * its documentation for any purpose and without fee is hereby granted
 * provided that the above copyright notice appear in all copies and
 * that both the copyright notice and this permission notice appear
 * in supporting documentation.
 *
 * Neither the Institution, Oak Ridge National Laboratory, nor the
 * Authors make any representations about the suitability of this
 * software for any purpose.  This software is provided ``as is''
 * without express or implied warranty.
 *
 * XPVM was funded by the U.S. Department of Energy.
 */


/* XPVM Header */

#include "xpvm.h"


/* Global Variables */

char	*SIGNAL_STRS[NUM_SIGNALS] =
{
	"SIGHUP",
	"SIGINT",
	"SIGQUIT",
	"SIGILL",
	"SIGTRAP",
	"SIGABRT",
	"SIGEMT",
	"SIGFPE",
	"SIGKILL",
	"SIGBUS",
	"SIGSEGV",
	"SIGSYS",
	"SIGPIPE",
	"SIGALRM",
	"SIGTERM",
	"SIGURG",
	"SIGSTOP",
	"SIGTSTP",
	"SIGCONT",
	"SIGCHLD",
	"SIGTTIN",
	"SIGTTOU",
	"SIGIO",
	"SIGXCPU",
	"SIGXFSZ",
	"SIGVTALRM",
	"SIGPROF",
	"SIGWINCH",
	"SIGLOST",
	"SIGUSR1",
	"SIGUSR2"
};

char	*HOST_CMD_STRS[MAX_HID] =
{
	"Add All Hosts",
	"Other Hosts..."
};

char	*HOST_CMD_HELP[MAX_HID] =
{
"Simultaneously Add All Hosts on the Menu to the PVM Virtual Machine",
"Raise / Lower Dialog to Add Another Host (Not Already on Menu)"
};

char		*HOST_MENU_HELP_STR = "Add / Delete Host";

char		TMP_CMD[1024];

char		*TMP_COLOR;

char		*TMP_HOST;

struct timeval	CURRENT_TIME;
struct timeval	BASE_TIME;

int			PROCESS_COUNTER_OVERWRITE;
int			PROCESS_COUNTER_PLAYBACK;

int			RECV_COUNTER_OVERWRITE;
int			RECV_COUNTER_PLAYBACK;

int			RECV_TIMER_OVERWRITE;
int			RECV_TIMER_PLAYBACK;

int			PROCESS_COUNTER_INTERVAL;
int			RECV_COUNTER_INTERVAL;

int			RECV_TIMER_INTERVAL;

int			CORRELATE_LOCK;
int			INTERFACE_LOCK;
int			TASK_OUT_LOCK;
int			PROCESS_LOCK;
int			RECV_LOCK;
int			TICK_LOCK;
int			STARTUP;

int			TRACE_OVERWRITE_FLAG;
int			TRACE_PROCESS_LOCK;
int			TRACE_MODE_PENDING;
int			TRACE_FILE_STATUS;
int			TRACE_MSG_ACTIVE;
int			TRACE_DO_SPAWN;
int			TRACE_PENDING;
int			TRACE_ACTIVE;
int			TRACE_STATUS;
int			TRACE_FORMAT;
int			TRACE_BUF;
int			TRACE_OPT;

int			NEEDS_REDRAW_NT;
int			NEEDS_REDRAW_ST;
int			NEEDS_REDRAW_UT;
int			NEEDS_REDRAW_MQ;
int			NEEDS_REDRAW_CT;

int			REGISTERED;

char		*CURRENT_TRACE_MASK;

Pvmtmask	TRACE_MASK;
Pvmtmask	TRACE33_MASK;

Pvmtmask	TRACE_MASK_CLEAR;
Pvmtmask	TRACE33_MASK_CLEAR;

TRC_ID		ID;

int			TEV33_TYPE[TRC_OLD_TRACE_MAX];

int			GROUPS_ALIVE;

Tcl_Interp	*interp;

Tk_Window	Top;

Display		*Disp;

TRACE_MASK_GROUP	*CURRENT_GROUP_LIST;

TRACE_MASK_GROUP	TM33_GROUP_LIST;
TRACE_MASK_GROUP	TM_GROUP_LIST;

TRACE_MASK_INDEX	*CURRENT_INDEX_LIST;

TRACE_MASK_INDEX	TM33_INDEX_LIST;
TRACE_MASK_INDEX	TM_INDEX_LIST;

TWIN		TASK_OUTPUT;

TWIN		TASK_TEVHIST;

MSG			PENDING_MSG_LIST;

MSG_GRID	**PENDING_MSG_GRID;

int			MSG_GRID_SIZE;

MSG			MSG_LIST;

TASK		TASK_LIST;

int			NTASKS;

UT_STATE	UT_LIST;

ARCH		ARCH_LIST;

TRC_HOST	HOST_LIST;

int			NHOSTS;

NETWORK		MAIN_NET;

TRC_HOST	*ADD_HOSTS;
char		**ADD_HOSTS_NAMES;
int			ADD_HOSTS_SIZE;
int			NADDS;

char		*HOME_DIR;

char		*XPVM_DIR;

char		*HOSTFILE;

char		*screen_name = (char *) NULL;
char		*base_name = (char *) NULL;

char		**Argv;
int 		Argc;

int			ST_SCROLL_MARK;
int			UT_SCROLL_MARK;

int			TASK_SORT;

int			TIMEIDX;

int			NEW_PVM;

int			TMP_CMP;

int			TMP_CC;

int			TMP_I;

int 		MYTID;

int			Nflag;
int 		eflag;
int 		tflag;
int 		vflag;


/* TCL Globals */

TCL_GLOBAL	TMP_GLOBAL;

TCL_GLOBAL	DEPTH;

TCL_GLOBAL	FIXED_ROW_HEIGHT;

TCL_GLOBAL	FIXED_COL_WIDTH;

TCL_GLOBAL	FRAME_BORDER;

TCL_GLOBAL	FRAME_OFFSET;

TCL_GLOBAL	BORDER_SPACE;

TCL_GLOBAL	ROW_HEIGHT;

TCL_GLOBAL	COL_WIDTH;

TCL_GLOBAL	ICON_BORDER;

TCL_GLOBAL	ICON_SPACE;

TCL_GLOBAL	NET_CHEIGHT;

TCL_GLOBAL	NET_HHEIGHT;

TCL_GLOBAL	NET_CWIDTH;

TCL_GLOBAL	NET_HWIDTH;

TCL_GLOBAL	NET_ACTIVE;

TCL_GLOBAL	NET_SCROLL;

TCL_GLOBAL	NET_FLASH;

TCL_GLOBAL	NET_SPACE;

TCL_GLOBAL	NET_XVIEW;

TCL_GLOBAL	NET_YVIEW;

TCL_GLOBAL	NET_SIZE;

int			UT_MAX_NTASKS;

int			MSG_DEFAULT_NBYTES;

int			MQ_MAX_NBYTES;

TCL_GLOBAL	NET_RUNNING_COLOR;
TCL_GLOBAL	NET_SYSTEM_COLOR;
TCL_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_WT;

TCL_GLOBAL	MQ_CHEIGHT;

TCL_GLOBAL	MQ_ACTIVE;

TCL_GLOBAL	MQ_CWIDTH;

TCL_GLOBAL	MQ_XVIEW;

TCL_GLOBAL	CT_QUERY_INDEX;

TCL_GLOBAL	CT_CHEIGHT;

TCL_GLOBAL	CT_ACTIVE;

TCL_GLOBAL	CT_YVIEW;

TCL_GLOBAL	TO_CHEIGHT;

TCL_GLOBAL	TO_ACTIVE;

TCL_GLOBAL	TO_YVIEW;

TCL_GLOBAL	TO_LASTY;

TCL_GLOBAL	TV_CHEIGHT;

TCL_GLOBAL	TV_ACTIVE;

TCL_GLOBAL	TV_YVIEW;

TCL_GLOBAL	TV_LASTY;

char		*NET;
char		*NET_C;
char		*NET_SBH;
char		*NET_SBV;

char		*CTRL;

char		*ST;
char		*ST_L;
char		*ST_C;
char		*ST_SBH;
char		*ST_SBV;

char		*SP;

char		*KL;
char		*KL_C;
char		*KL_SBH;
char		*KL_SBV;

char		*SG;
char		*SG_C;
char		*SG_SBH;
char		*SG_SBV;
char		*SG_LF;
char		*SG_LFC;
char		*SG_LFCW;
char		*SG_LSBV;

char		*OV;

char		*OF;

char		*UT;
char		*UT_F;
char		*UT_C;
char		*UT_SBH;

char		*MQ;
char		*MQ_F;
char		*MQ_C;
char		*MQ_SBH;

char		*CT;
char		*CT_F;
char		*CT_L;
char		*CT_C;
char		*CT_SBH;
char		*CT_SBV;

char		*TO;
char		*TO_F;
char		*TO_C;
char		*TO_SBH;
char		*TO_SBV;

char		*TV;
char		*TV_F;
char		*TV_C;
char		*TV_SBH;
char		*TV_SBV;