File: trace.h

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 (109 lines) | stat: -rw-r--r-- 2,623 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

/* $Id: trace.h,v 4.50 1998/04/09 21:12:23 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.
 */

/* Trace Handling Constants */

#define HANDLE_FIRST		1
#define HANDLE_NEWTASK		1
#define HANDLE_SPNTASK		2
#define HANDLE_ENDTASK		3
#define HANDLE_HOST_ADD		4
#define HANDLE_HOST_DEL		5
#define HANDLE_HOST_SYNC	6
#define HANDLE_OUTPUT		7
#define HANDLE_EXIT			8
#define HANDLE_SEND			9
#define HANDLE_MCAST		10
#define HANDLE_PSEND		11
#define HANDLE_RECV			12
#define HANDLE_NRECV		13
#define HANDLE_PRECV		14
#define HANDLE_TRECV		15
#define HANDLE_USER_DEFINED	16
#define HANDLE_MAX			16

/* Trace Mask Compatibility Macros */

#define INIT_TRACE_MASK( _mask, _fmt ) \
{ \
	if ( (_fmt) == TEV_FMT_33 ) \
	{ \
		TEV33_MASK_INIT( _mask ); \
	} \
\
	else if ( (_fmt) == TEV_FMT_34 ) \
	{ \
		TEV_MASK_INIT( _mask ); \
	} \
} \
\

#define SET_TRACE_MASK( _mask, _fmt, _index ) \
{ \
	if ( (_fmt) == TEV_FMT_33 ) \
	{ \
		TEV33_MASK_SET( _mask, _index ); \
	} \
\
	else if ( (_fmt) == TEV_FMT_34 ) \
	{ \
		TEV_MASK_SET( _mask, _index ); \
	} \
} \
\

#define UNSET_TRACE_MASK( _mask, _fmt, _index ) \
{ \
	if ( (_fmt) == TEV_FMT_33 ) \
	{ \
		TEV33_MASK_UNSET( _mask, _index ); \
	} \
\
	else if ( (_fmt) == TEV_FMT_34 ) \
	{ \
		TEV_MASK_UNSET( _mask, _index ); \
	} \
} \
\

#define CHECK_TRACE_MASK( _mask, _fmt, _index ) \
( \
	(_fmt) == TEV_FMT_33 ? \
		TEV33_MASK_CHECK( _mask, _index ) : \
		TEV_MASK_CHECK( _mask, _index ) \
) \
\

#define FIRST_EVENT( _fmt ) \
	( (_fmt) == TEV_FMT_33 ? TRC_OLD_TEV_FIRST : TEV_FIRST )

#define LAST_EVENT( _fmt ) \
	( (_fmt) == TEV_FMT_33 ? TRC_OLD_TEV_MAX : TEV_MAX )

#define EVENT_INCR( _fmt )    ( (_fmt) == TEV_FMT_33 ? 2 : 1 )

#define TRACE_MASK_LENGTH( _fmt ) \
	( (_fmt) == TEV_FMT_33 ? TEV33_MASK_LENGTH : TEV_MASK_LENGTH )