summaryrefslogtreecommitdiff
path: root/InfraStack/OSAgnostic/Common/L4Common/SourceControl/CommonTypes.h
blob: b410c389f07b3c629a6f312ac1c92038f2093fe9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
/*************************************************************************
**                                                                      **
**                  I N T E L ( ENVARA ) P R O P R I E T A R Y          **
**                                                                      **
**     COPYRIGHT (c)  2005 BY  INTEL  CORPORATION.  ALL RIGHTS          **
**     RESERVED.   NO  PART  OF THIS PROGRAM  OR  PUBLICATION  MAY      **
**     BE  REPRODUCED,   TRANSMITTED,   TRANSCRIBED,   STORED  IN  A    **
**     RETRIEVAL SYSTEM, OR TRANSLATED INTO ANY LANGUAGE OR COMPUTER    **
**     LANGUAGE IN ANY FORM OR BY ANY MEANS, ELECTRONIC, MECHANICAL,    **
**     MAGNETIC,  OPTICAL,  CHEMICAL, MANUAL, OR OTHERWISE,  WITHOUT    **
**     THE PRIOR WRITTEN PERMISSION OF INTEL  CORPORATION.              **
**                                                                      **
*************************************************************************/

/**
 * @file
 *
 * CommonTypes.h
 *
 * Types that are defined the same way in all platforms, based on
 * the basic types.
 * 
 * @version 1.0    07-July-2005    Yariv Barkan\n
 *    Initial version
 *
 */

#ifndef __COMMONTYPES_H
#define __COMMONTYPES_H

// just for completeness
typedef INT		SINT;	
typedef INT8	SINT8;
typedef INT16	SINT16;
typedef INT32	SINT32;
typedef INT64	SINT64;

// booleans

typedef UINT8		BOOL8;
typedef UINT16	BOOL16;
typedef UINT32	BOOL32;
typedef UINT64	BOOL64;

// volatiles
typedef volatile INT		VINT;
typedef volatile INT8		VINT8;
typedef volatile INT16		VINT16;
typedef volatile INT32		VINT32;
typedef volatile INT64		VINT64;

typedef volatile UINT		VUINT;
typedef volatile UINT8		VUINT8;
typedef volatile UINT16		VUINT16;
typedef volatile UINT32		VUINT32;
typedef volatile UINT64		VUINT64;

// standard pointers
typedef void*		PVOID;
typedef const void*	PCVOID;

typedef INT*		PINT;
typedef INT8*		PINT8;
typedef INT16*		PINT16;
typedef INT32*		PINT32;
typedef INT64*		PINT64;

typedef UINT*		PUINT;
typedef UINT8*		PUINT8;
typedef UINT16*		PUINT16;
typedef UINT32*		PUINT32;
typedef UINT64*		PUINT64;

// pointers to volatile
typedef VINT*		PVINT;
typedef VINT8*		PVINT8;
typedef VINT16*		PVINT16;
typedef VINT32*		PVINT32;
typedef VINT64*		PVINT64;

typedef VUINT*		PVUINT;
typedef VUINT8*		PVUINT8;
typedef VUINT16*	PVUINT16;
typedef VUINT32*	PVUINT32;
typedef VUINT64*	PVUINT64;

// strings
typedef char*		PSTR;
typedef const char*	PCSTR;

/// when you need to hold both a pointer and a number
#ifdef WIN64
typedef UINT64 POINTER_AND_UINT;
#else
typedef UINT POINTER_AND_UINT;
#endif

#if defined(PRJCFG_ESHEL_WIMAX_CORE) || defined(PRJCFG_NELSON_CORE)
//this part made for eshel use only

typedef enum status_enum{
 STATUS_SUCCESS = 0 ,
 STATUS_FAIL    = 1
}STATUS_ENUM;
#endif
#define MAX_NUMBER_OF_MEM_TRANS_DESCRIPTORS 5

typedef struct
{
    void *src;
    void *dst;
    UINT32 size; 
    UINT32 currPos;
} BufferTransferDesc, *PBufferTransferDesc;

typedef struct
{
    UINT8    numOfBuffers;
    BufferTransferDesc buffers[MAX_NUMBER_OF_MEM_TRANS_DESCRIPTORS];
} ScatteredTransactionDesc, *PScatteredTransactionDesc;

#define CYCLIC_QUEUE_MAX_NUMBER_OF_FRAGMENTS 2
typedef struct
{
    ScatteredTransactionDesc transDesc;
    UINT8  dataType;
    UINT32 currDataPos;
    UINT32 totalDataLength;
}
DataTransactionDesc, *PDataTransactionDesc;
typedef void(*PRELEASE_PACKET_FUNC)(PDataTransactionDesc); 
#ifndef NATIVE_LINUX
#include "ObsoletedTypes.h"
#endif 

#endif //__COMMONTYPES