FreeCalypso > hg > fc-magnetite
annotate src/condat3/com/include/gsm.h @ 665:2795a11973b8
UART PS entity: added trace of line state changes
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Wed, 27 May 2020 22:46:55 +0000 |
parents | c8bd5a927942 |
children |
rev | line source |
---|---|
18
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /* |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 +----------------------------------------------------------------------------- |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 | Project : GSM-PS (6147) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 | Modul : GSM |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 +----------------------------------------------------------------------------- |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 | Copyright 2002 Texas Instruments Berlin, AG |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 | All rights reserved. |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 | |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 | This file is confidential and a trade secret of Texas |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 | Instruments Berlin, AG |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 | The receipt of or possession of this file does not convey |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 | any rights to reproduce or disclose its contents or to |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 | manufacture, use, or sell anything it may describe, in |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 | whole, or in part, without the specific written consent of |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 | Texas Instruments Berlin, AG. |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 +----------------------------------------------------------------------------- |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 | Purpose : Definition of global constants, types, and macros |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 | for the GSM Protocol Stack |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 +----------------------------------------------------------------------------- |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 */ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 #ifndef GSM_H |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 #define GSM_H |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 #ifndef CCONST_CDG |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 #include "mconst.cdg" /* MAX_BITSTREAM_LEN */ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 #endif /* CCONST_CDG */ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 #ifndef PCONST_CDG |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 #include "pconst.cdg" /* MAX_PSTRUCT_LEN */ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 #endif /* PCONST_CDG */ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 /*==== CONSTANTS ==================================================*/ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 #define MAX_2_PRM 1 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 #define MAX_4_PRM 3 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 #define MAX_8_PRM 7 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 #define MAX_16_PRM 15 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 #define MAX_32_PRM 31 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
40 #define PRM_MASK 0x00FF /* protocol primitive mask*/ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 #define OPC_MASK 0xFF00 /* entity mask */ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 #define SYS_MASK 0x8000 /* system primitive mask */ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 #define SYS_CONFIG_REQ 0xF000 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 #define L3_CODING_OFFSET 32 /* coding offset in bits */ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 /* |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 * Not Present Value |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
50 */ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
51 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
52 #define NOT_PRESENT_8BIT 0xFF |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
53 #define NOT_PRESENT_CHAR (CHAR)0xFF |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
54 #define NOT_PRESENT_16BIT 0xFFFF |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
55 #define NOT_PRESENT_32BIT 0xFFFFFFFFL |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
56 #define INVALID_ADDRESS 0xFFFFFFFFL |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
57 #define SET_NOT_PRESENT(A) ((A) = ((sizeof ((A)) EQ 1)\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
58 ? NOT_PRESENT_8BIT\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
59 : (sizeof ((A)) EQ 2)\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
60 ? NOT_PRESENT_16BIT\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
61 : NOT_PRESENT_32BIT)) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
62 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
63 #define IS_PRESENT(A) ((A) NEQ ((sizeof ((A)) EQ 1)\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
64 ? NOT_PRESENT_8BIT\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
65 : (sizeof ((A)) EQ 2)\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
66 ? NOT_PRESENT_16BIT\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
67 : NOT_PRESENT_32BIT)) /* VK 09-12-96 */ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
68 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
69 #ifndef NEW_FRAME |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
70 /* |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
71 * Static Configurations |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
72 */ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
73 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
74 #ifndef TC_FUNC |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
75 #define TC_FUNC 1 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
76 #endif |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
77 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
78 #ifdef TRACE_FKT |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
79 #define TRACE_FUNCTION(a) vsi_o_trace(VSI_CALLER TC_FUNC,a); |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
80 #else |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
81 // China change HM 6.07.00, one of this commented out |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
82 #define TRACE_FUNCTION(a) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
83 //#define TRACE_FUNCTION(a) vsi_o_mtrace(a); |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
84 #endif |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
85 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
86 #ifndef TC_EVE |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
87 #define TC_EVE 2 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
88 #endif |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
89 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
90 #ifdef TRACE_EVE |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
91 #define TRACE_EVENT(a) vsi_o_trace(VSI_CALLER TC_EVENT,a); |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
92 #else |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
93 #define TRACE_EVENT(a) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
94 #endif |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
95 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
96 #ifndef TC_ERROR |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
97 #define TC_ERROR 4 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
98 #endif |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
99 #ifdef TRACE_ERR |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
100 #define TRACE_ERROR(a) vsi_o_trace(VSI_CALLER TC_ERROR,a); |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
101 #else |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
102 #define TRACE_ERROR(a) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
103 #endif |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
104 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
105 #ifndef TC_PRIM |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
106 #define TC_PRIM 8 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
107 #endif |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
108 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
109 #ifdef TRACE_PRIM |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
110 #define TRACE_PRIMITIVE(a) vsi_o_trace(VSI_CALLER TC_PRIM,a); |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
111 #else |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
112 #define TRACE_PRIMITIVE(a) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
113 #endif |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
114 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
115 #ifndef TC_SYSTEM |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
116 #define TC_SYSTEM 16 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
117 #endif |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
118 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
119 /* |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
120 * Assert wrapper |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
121 */ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
122 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
123 #if defined NDEBUG |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
124 #define TRACE_ASSERT(e) ((void)0) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
125 #else |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
126 #ifdef SHARED_VSI |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
127 #define TRACE_ASSERT(e) if ( !(e) ) vsi_o_assert("",#e,__FILE__,__LINE__) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
128 #else |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
129 #define TRACE_ASSERT(e) if ( !(e) ) vsi_o_assert(#e,__FILE__,__LINE__) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
130 #endif |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
131 #endif |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
132 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
133 #ifdef assert |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
134 #undef assert |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
135 #endif |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
136 #define assert TRACE_ASSERT |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
137 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
138 #endif /* NEW_FRAME */ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
139 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
140 /* |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
141 * Memory Management(I) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
142 */ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
143 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
144 #ifdef OPTION_REF |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
145 #define FREE_BUFFER(p) vsi_c_free(VSI_CALLER (void **)&p) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
146 /*lint -e773 Expression-like macro not parenthesized*/ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
147 #define NEW_BUFFER(p,s) T_PRIM *p = vsi_c_new(VSI_CALLER (T_VSI_CSIZE)((s)+sizeof(T_PRIM_HEADER))) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
148 /*lint +e773*/ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
149 #else |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
150 #define FREE_BUFFER(p) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
151 #define NEW_BUFFER(p,s) UBYTE buf_##p [(s)+sizeof(T_PRIM_HEADER)]; T_PRIM *p=(T_PRIM*)p1 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
152 #endif |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
153 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
154 #if !defined (_TMS470) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
155 #define Sprintf sprintf |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
156 #else |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
157 int sprintf( char *buffer, const char *format, ... ); |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
158 #endif |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
159 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
160 #ifndef NEW_FRAME |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
161 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
162 #ifdef _TMS470 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
163 #define SET_PRIM_OPCODE(P,O) P->custom.opc = O; P->custom.opc2 = 0 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
164 #else |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
165 #define SET_PRIM_OPCODE(P,O) P->custom.opc = O |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
166 #endif |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
167 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
168 #ifdef OPTION_LENGTH |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
169 #define SEND_PRIM(E,P,O,T) SET_PRIM_OPCODE (P,O); vsi_c_send (VSI_CALLER hComm##E, P, sizeof(T_PRIM_HEADER) + sizeof (T)) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
170 #define SEND_PRIM_0(E,P,O) SET_PRIM_OPCODE (P,O); vsi_c_send (VSI_CALLER hComm##E, P, sizeof(T_PRIM_HEADER)) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
171 #define SEND_PRIM_SDU(E,P,O,T,L) SET_PRIM_OPCODE (P,O); vsi_c_send (VSI_CALLER hComm##E, P, (T_VSI_CSIZE) (sizeof(T_PRIM_HEADER) + sizeof (T) + (L) - SDU_TRAIL)) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
172 #else |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
173 #define SEND_PRIM(E,P,O,T) SET_PRIM_OPCODE (P,O); vsi_c_send (VSI_CALLER hComm##E, P, sizeof(T_PRIM_HEADER) + sizeof (T)) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
174 #define SEND_PRIM_0(E,P,O) SET_PRIM_OPCODE (P,O); vsi_c_send (VSI_CALLER hComm##E, P, sizeof(T_PRIM_HEADER)) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
175 #define SEND_PRIM_SDU(E,P,O,T,L) SET_PRIM_OPCODE (P,O); vsi_c_send (VSI_CALLER hComm##E, P, (T_VSI_CSIZE) (sizeof(T_PRIM_HEADER) + sizeof (T) + (L) - SDU_TRAIL)) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
176 #endif |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
177 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
178 #endif /* NEW_FRAME */ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
179 /* |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
180 * declares a pointer variable (D) of the type T |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
181 * and initialize it with the startaddress of the data part |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
182 * of the primitive P |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
183 */ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
184 #ifndef ALLOC_CHECK |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
185 #if defined (_TMS470) AND defined (NWARN) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
186 #define PRIM_ACCESS(P,S) &P->data |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
187 #else |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
188 #define PRIM_ACCESS(P,S) P->data |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
189 #endif |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
190 #else |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
191 #define PRIM_ACCESS(P,S) vsi_c_access(VSI_CALLER P,S) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
192 #endif |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
193 /*lint -e773 Expression-like macro not parenthesized*/ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
194 #define PRIM_CAST(P,D,T) T *D = (T *) PRIM_ACCESS (P, sizeof (T)) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
195 /*lint +e773*/ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
196 /* |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
197 * declares a pointer variable (D) of the type T and |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
198 * initialize it with the start address of the global declared |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
199 * buffer _decodedMsg[] wich contains the decoded message |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
200 * structure before encoding or after decoding the message |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
201 * with CCD. |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
202 */ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
203 /*lint -e773 Expression-like macro not parenthesized*/ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
204 #define MSG_CAST(D,T) T *D = (T *) _decodedMsg |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
205 /*lint +e773*/ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
206 /* |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
207 * Memory Management(II) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
208 */ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
209 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
210 #ifndef NEW_FRAME |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
211 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
212 #if defined (_TMS470) AND defined (NWARN) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
213 #define P2D(P) (&(P)->data) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
214 #else |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
215 #define P2D(P) ((P)->data) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
216 #endif |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
217 #define D2P(D) ((T_PRIM*)((T_PRIM_HEADER*)(D)-1)) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
218 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
219 #ifdef ALLOC_CHECK |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
220 #define P2D_AC(P,T) PRIM_ACCESS(P,sizeof(T)) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
221 #else |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
222 #define P2D_AC(P,T) P2D(P) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
223 #endif |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
224 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
225 #define PRIM_TO_DATA P2D |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
226 #define DATA_TO_PRIM D2P |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
227 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
228 #define P_OPC(P) (P)->custom.opc |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
229 #define P_OPC2(P) (P)->custom.opc2 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
230 #define P_LEN(P) (P)->custom.len |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
231 #define P_TID(P) (P)->custom.tid |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
232 #define P_SDU(P) (P)->custom.sdu |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
233 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
234 #define D_OPC(D) P_OPC(D2P(D)) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
235 #define D_OPC2(D) P_OPC2(D2P(D)) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
236 #define D_LEN(D) P_LEN(D2P(D)) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
237 #define D_TID(D) P_TID(D2P(D)) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
238 #define D_SDU(D) P_SDU(D2P(D)) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
239 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
240 #define D_SDU_LEN(D) D_SDU(D)->l_buf |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
241 #define D_SDU_OFF(D) D_SDU(D)->o_buf |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
242 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
243 #define BITS_PER_BYTE 8 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
244 #define BYTELEN(BITLEN) ((BITLEN)<=0?0:((((BITLEN)-1)/BITS_PER_BYTE)+1)) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
245 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
246 #define PRIM_SIZE(D) (sizeof(T_PRIM_HEADER)+sizeof(*(D))) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
247 #define PRIM_SIZE_SDU(D) (PRIM_SIZE(D)+BYTELEN((D)->sdu.o_buf+(D)->sdu.l_buf)) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
248 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
249 #define PSIZE(D) (D_LEN(D)+((D_SDU(D)==0)?0:(BYTELEN(D_SDU_LEN(D)+D_SDU_OFF(D))-SDU_TRAIL))) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
250 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
251 #define SIZ(T) (sizeof(T_PRIM_HEADER)+sizeof(T)) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
252 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
253 #define SIZ_SDU(T,M) (SIZ(T)+BYTELEN((M)+ENCODE_OFFSET)-SDU_TRAIL) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
254 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
255 #define P_ALL(T) (T_PRIM *) vsi_c_new(VSI_CALLER (T_VSI_CSIZE)SIZ(T) ) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
256 #define P_ALL_SDU(T,M) (T_PRIM *) vsi_c_new(VSI_CALLER (T_VSI_CSIZE)SIZ_SDU(T,M)) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
257 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
258 #endif /* NEW_FRAME */ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
259 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
260 #define OFFSETOF(P,C) ((char*)&(P->C) - (char*)P) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
261 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
262 #ifdef NTRACE |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
263 #define xxxNotify(A,B,C,D,E) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
264 #else |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
265 #define xxxNotify(A,B,C,D,E) /* not used yet */ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
266 #endif |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
267 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
268 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
269 #define ACT_PALLOC 0x01 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
270 #define ACT_PALLOC_SDU 0x02 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
271 #define ACT_PALLOC_MSG 0x03 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
272 #define ACT_PREUSE 0x04 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
273 #define ACT_PREUSE_SDU 0x05 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
274 #define ACT_PREUSE_MSG 0x06 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
275 #define ACT_PFREE 0x07 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
276 #define ACT_PSEND 0x08 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
277 #define ACT_PSTORE 0x09 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
278 #define ACT_PRETRIEVE 0x0A |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
279 #define ACT_PACCESS 0x0B |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
280 #define ACT_PPASS 0x0C |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
281 #define ACT_PCAST 0x0D |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
282 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
283 /*** memory alloction ***/ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
284 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
285 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
286 #ifndef NEW_FRAME |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
287 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
288 #define PSENDX PSEND |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
289 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
290 #define PALLOC(D,T) T_##T *D = (T_##T*)P2D(P_ALL(T_##T));\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
291 D_OPC(D) = (T);\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
292 D_OPC2(D) = 0;\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
293 D_LEN(D) = SIZ(T_##T);\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
294 D_SDU(D) = 0;\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
295 xxxNotify(ACT_PALLOC,VSI_CALLER,__FILE__,__LINE__,D2P(D)) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
296 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
297 #define PALLOC_MSG(D,T,M) T_##T *D = (T_##T*)P2D(P_ALL_SDU(T_##T,BSIZE_##M));\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
298 D_OPC(D) = (T);\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
299 D_OPC2(D) = 0;\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
300 D_LEN(D) = SIZ(T_##T);\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
301 D_SDU(D) = &((D)->sdu);\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
302 D_SDU_LEN(D) = (BSIZE_##M);\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
303 D_SDU_OFF(D) = ENCODE_OFFSET;\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
304 xxxNotify(ACT_PALLOC_MSG,VSI_CALLER,__FILE__,__LINE__,D2P(D)) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
305 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
306 #define PALLOC_SDU(D,T,N) T_##T *D = (T_##T*)P2D(P_ALL_SDU(T_##T,N));\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
307 D_OPC(D) = (T);\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
308 D_OPC2(D) = 0;\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
309 D_LEN(D) = SIZ(T_##T);\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
310 D_SDU(D) = &((D)->sdu);\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
311 D_SDU_LEN(D) = (N);\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
312 D_SDU_OFF(D) = ENCODE_OFFSET;\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
313 xxxNotify(ACT_PALLOC_SDU,VSI_CALLER,__FILE__,__LINE__,D2P(D)) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
314 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
315 #define PREUSE(D0,D,T) T_##T *D = (T_##T*)P2D_AC(D2P(D0),T);\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
316 D_OPC(D) = (T);\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
317 D_OPC2(D) = 0;\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
318 D_LEN(D) = SIZ(T_##T);\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
319 D_SDU(D) = 0;\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
320 xxxNotify(ACT_REUSE,VSI_CALLER,__FILE__,__LINE__,D2P(D)) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
321 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
322 #define PREUSE_MSG(D,T,M) T_##T *D = (T_##T*)P2D_AC(D2P(D0),T);\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
323 D_OPC(D) = (T);\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
324 D_OPC2(D) = 0;\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
325 D_LEN(D) = SIZ(T_##T);\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
326 D_SDU(D) = &((D)->sdu);\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
327 D_SDU_LEN(D) = (BSIZE_##M);\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
328 D_SDU_OFF(D) = ENCODE_OFFSET;\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
329 xxxNotify(ACT_PREUSE_MSG,VSI_CALLER,__FILE__,__LINE__,D2P(D)) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
330 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
331 #define PREUSE_SDU(D,T,N) T_##T *D = (T_##T*)P2D_AC(D2P(D0),T);\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
332 USHORT BSIZE_##N;\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
333 D_OPC(D) = (T);\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
334 D_OPC2(D) = 0;\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
335 D_LEN(D) = SIZ(T_##T);\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
336 D_SDU(D) = &((D)->sdu);\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
337 D_SDU_LEN(D) = (N);\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
338 D_SDU_OFF(D) = ENCODE_OFFSET;\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
339 xxxNotify(ACT_PREUSE_SDU,VSI_CALLER,__FILE__,__LINE__,D2P(D)) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
340 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
341 #define PFREE(D) { void *z=(void*)D2P(D);\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
342 vsi_c_free(VSI_CALLER (void **)&z);\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
343 xxxNotify(ACT_PFREE,VSI_CALLER,__FILE__,__LINE__,D2P(D)); } |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
344 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
345 #define PSEND(E,D) PTRACE_OUT(D_OPC(D));\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
346 vsi_c_send (VSI_CALLER hComm##E, D2P(D), (T_VSI_CSIZE) PSIZE(D));\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
347 xxxNotify(ACT_PSEND,VSI_CALLER,__FILE__,__LINE__,D2P(D)) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
348 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
349 #define PPASS(D0,D,T) T_##T *D = (T_##T*)P2D_AC(D2P(D0),T);\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
350 D_OPC(D) = (T);\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
351 xxxNotify(ACT_PPASS,VSI_CALLER,__FILE__,__LINE__,D2P(D)) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
352 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
353 #define PACCESS(D) xxxNotify(ACT_PACCESS,VSI_CALLER,__FILE__,__LINE__,D2P(D)) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
354 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
355 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
356 #endif /* NEW_FRAME */ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
357 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
358 /* |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
359 * to achieve backward compatibility |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
360 */ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
361 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
362 #if defined (NEW_FRAME) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
363 #ifdef TI_PS_HCOMM_CHANGE |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
364 #define PSENDX(A,B) PSEND(_hComm##A,B) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
365 #define _hCommACI hCommACI |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
366 #else |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
367 #define PSENDX(A,B) PSEND(hComm##A,B) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
368 #endif |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
369 #else |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
370 #define PSENDX PSEND |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
371 #endif |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
372 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
373 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
374 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
375 #define PRETRIEVE /* NOT DEFINED YET */ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
376 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
377 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
378 #define MCAST(D,T) MSG_CAST(D,T_##T) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
379 #define PCAST(P,D,T) T_##T *D = (T_##T*)P2D_AC(P,T);\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
380 P_OPC(P)=T;\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
381 xxxNotify(ACT_PCAST,VSI_CALLER,__FILE__,__LINE__,D2P(D)) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
382 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
383 #define PCOPY(DEST,SOURCE) memcpy(DEST,SOURCE,PSIZE(SOURCE)-sizeof(T_PRIM_HEADER)) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
384 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
385 /*** trace primitive, trace state ***/ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
386 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
387 #ifndef NEW_FRAME |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
388 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
389 #ifdef NTRACE |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
390 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
391 #define SET_STATE(PROCESS,STATE) ENTITY_DATA->state[PROCESS] = STATE |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
392 #define GET_STATE(PROCESS) ENTITY_DATA->state[PROCESS] |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
393 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
394 #define PTRACE_IN(OPC) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
395 #define PTRACE_OUT(OPC) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
396 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
397 #else |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
398 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
399 #define SET_STATE(PROCESS,STATE)\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
400 ENTITY_DATA->state[PROCESS] =\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
401 vsi_o_strace (VSI_CALLER\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
402 PROCESS_NAME[PROCESS],\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
403 PROCESS##_NAME [ ENTITY_DATA->state[PROCESS] ],\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
404 PROCESS##_NAME [ STATE ],\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
405 STATE ) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
406 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
407 #define GET_STATE(PROCESS)\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
408 vsi_o_strace (VSI_CALLER\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
409 PROCESS_NAME[PROCESS],\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
410 PROCESS##_NAME [ ENTITY_DATA->state[PROCESS] ],\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
411 NULL ,\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
412 ENTITY_DATA->state[PROCESS] ) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
413 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
414 #define PTRACE_IN(OPC) vsi_o_ptrace (VSI_CALLER OPC, 0) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
415 #define PTRACE_OUT(OPC) vsi_o_ptrace (VSI_CALLER OPC, 1) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
416 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
417 #endif |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
418 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
419 #endif /* NEW_FRAME */ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
420 /* |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
421 * Timer, Jump Table, Configuration |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
422 */ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
423 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
424 #ifdef OPTION_TIMER |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
425 #define TSTART(i,h,v) tim_start_timer(i,h,v) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
426 #else |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
427 #define TSTART(i,h,v) TIMER_START(VSI_CALLER h,v) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
428 #endif |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
429 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
430 #ifdef OPTION_RELATIVE |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
431 #define JUMP(a) (a+offset) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
432 #else |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
433 #define JUMP(a) (a) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
434 #endif |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
435 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
436 #ifdef OPTION_SET_CONFIG_ONLY |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
437 #define GET_CONFIG(s,i) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
438 #else |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
439 #define GET_CONFIG(s,i) pei_get_config(s,i) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
440 #endif |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
441 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
442 /* Cause Concept (begin) */ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
443 /* |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
444 * For a definition of the cause concept please refer to document number |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
445 * 8443.711, named in February 2002 "cause_concept.doc" |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
446 */ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
447 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
448 /* definitions for calling the macros */ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
449 /* DefinedBy bit */ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
450 #define DEFBY_STD 0 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
451 #define DEFBY_CONDAT 1 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
452 /* OriginatingSide bit */ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
453 #define ORIGSIDE_NET 0 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
454 #define ORIGSIDE_MS 1 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
455 /* |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
456 * note that OriginatingEntity definitions are in the SAP GSMCOM, which is a |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
457 * central (pseudo) SAP and the definitions are referenced in the using |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
458 * "real" SAPs, like e.g. MNSS SAP for the originating entity SS |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
459 */ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
460 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
461 /* need to decide whether to mask ORIGIN_ENTITY (max. 6 bits) in the following macro */ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
462 #define CAUSE_MAKE(DEFINED_BY, ORIGIN_SIDE, ORIGIN_ENTITY, CAUSE_VALUE) \ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
463 (USHORT)(((CAUSE_VALUE) & 0x00FF) |\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
464 ((DEFINED_BY) << 15) |\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
465 ((ORIGIN_SIDE) << 14) |\ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
466 ((ORIGIN_ENTITY) << 8)) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
467 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
468 /* Get the cause value without the originating entity */ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
469 #define GET_CAUSE_VALUE(cause) (UBYTE)((cause) & 0xFF) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
470 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
471 /* Get the entity originating the cause */ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
472 #define GET_CAUSE_ORIGIN_ENTITY(cause) (UBYTE)(((cause) >> 8) & 0x3F) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
473 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
474 /* Get the DefinedBy bit */ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
475 #define GET_CAUSE_DEFBY(cause) (UBYTE)((cause) >> 15) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
476 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
477 /* Get the OriginatingSide bit */ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
478 #define GET_CAUSE_ORIGSIDE(cause) (UBYTE)(((cause) >> 14) & 0x01) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
479 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
480 /* Determine if a cause is invalid */ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
481 #define IS_CAUSE_INVALID(cause) (((cause) & 0x80FF) EQ 0x80FF) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
482 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
483 /* Cause Concept (end) */ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
484 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
485 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
486 /*==== TYPES ======================================================*/ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
487 #if defined (_TMS470) && defined (NWARN) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
488 typedef struct |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
489 { |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
490 UBYTE x [MAX_PSTRUCT_LEN |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
491 + ( |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
492 L3_CODING_OFFSET |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
493 + MAX_BITSTREAM_LEN |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
494 ) / 8 + 1 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
495 ]; |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
496 } T_PARAMETER; |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
497 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
498 typedef struct |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
499 { |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
500 T_PRIM_HEADER custom; |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
501 T_PARAMETER data; |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
502 } T_PRIM; |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
503 #else |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
504 typedef struct |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
505 { |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
506 T_PRIM_HEADER custom; |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
507 UBYTE data [MAX_PSTRUCT_LEN |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
508 + ( |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
509 L3_CODING_OFFSET |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
510 + MAX_BITSTREAM_LEN |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
511 ) / 8 + 1 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
512 ]; |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
513 } T_PRIM; |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
514 #endif |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
515 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
516 /*==== EXPORT =====================================================*/ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
517 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
518 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
519 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
520 /* |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
521 * Multithreading |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
522 */ |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
523 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
524 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
525 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
526 #ifdef OPTION_MULTITHREAD |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
527 #if defined (ENTITY_CST) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
528 #define _ENTITY_PREFIXED(N) cst_##N |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
529 #elif defined (ENTITY_ACI) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
530 #define _ENTITY_PREFIXED(N) aci_##N |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
531 #elif defined (ENTITY_MFW) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
532 #define _ENTITY_PREFIXED(N) aci_##N |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
533 #elif defined (ENTITY_MMI) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
534 #define _ENTITY_PREFIXED(N) aci_##N |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
535 #elif defined (ENTITY_SMI) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
536 #define _ENTITY_PREFIXED(N) aci_##N |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
537 #elif defined (ENTITY_SIM) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
538 #define _ENTITY_PREFIXED(N) sim_##N |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
539 #elif defined (ENTITY_PL) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
540 #define _ENTITY_PREFIXED(N) pl_##N |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
541 #elif defined (ENTITY_L1) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
542 #define _ENTITY_PREFIXED(N) l1_##N |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
543 #elif defined (ENTITY_CC) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
544 #define _ENTITY_PREFIXED(N) cc_##N |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
545 #elif defined (ENTITY_SS) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
546 #define _ENTITY_PREFIXED(N) ss_##N |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
547 #elif defined (ENTITY_ESIM) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
548 #define _ENTITY_PREFIXED(N) esim_##N |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
549 #elif defined (ENTITY_SMS) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
550 #define _ENTITY_PREFIXED(N) sms_##N |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
551 #elif defined (ENTITY_MM) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
552 #define _ENTITY_PREFIXED(N) mm_##N |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
553 #elif defined (ENTITY_RR) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
554 #define _ENTITY_PREFIXED(N) rr_##N |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
555 #elif defined (ENTITY_DL) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
556 #define _ENTITY_PREFIXED(N) dl_##N |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
557 #elif defined (ENTITY_L2R) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
558 #define _ENTITY_PREFIXED(N) l2r_##N |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
559 #elif defined (ENTITY_TRA) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
560 #define _ENTITY_PREFIXED(N) tra_##N |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
561 #elif defined (ENTITY_RLP) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
562 #define _ENTITY_PREFIXED(N) rlp_##N |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
563 #elif defined (ENTITY_T30) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
564 #define _ENTITY_PREFIXED(N) t30_##N |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
565 #elif defined (ENTITY_FAD) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
566 #define _ENTITY_PREFIXED(N) fad_##N |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
567 #elif defined (ENTITY_RA) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
568 #define _ENTITY_PREFIXED(N) ra_##N |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
569 #elif defined (ENTITY_WAP) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
570 #define _ENTITY_PREFIXED(N) wap_##N |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
571 #elif defined (ENTITY_UDP) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
572 #define _ENTITY_PREFIXED(N) udp_##N |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
573 #elif defined (ENTITY_IP) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
574 #define _ENTITY_PREFIXED(N) ip_##N |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
575 #elif defined (ENTITY_RRLP) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
576 #define _ENTITY_PREFIXED(N) rrlp_##N |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
577 #elif defined (ENTITY_PPP) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
578 #define _ENTITY_PREFIXED(N) ppp_##N |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
579 #elif defined (ENTITY_BTI) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
580 #define _ENTITY_PREFIXED(N) bti_##N |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
581 #elif defined (ENTITY_L1) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
582 #ifdef NEW_FRAME |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
583 #include "ofe.h" |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
584 #endif |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
585 #elif defined (ENTITY_TAP) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
586 #define _ENTITY_PREFIXED(N) tap_##N |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
587 #elif defined (ENTITY_PCO) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
588 #define _ENTITY_PREFIXED(N) pco_##N |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
589 #elif defined (ENTITY_PAN) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
590 #define _ENTITY_PREFIXED(N) pan_##N |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
591 #elif defined (ENTITY_TST) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
592 #define _ENTITY_PREFIXED(N) tst_##N |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
593 #elif defined (ENTITY_APP) |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
594 #define _ENTITY_PREFIXED(N) app_##N |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
595 #endif |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
596 #endif |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
597 |
c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
598 #endif |