FreeBSD kernel pms device code
ostypes.h
Go to the documentation of this file.
1/*******************************************************************************
2*Copyright (c) 2014 PMC-Sierra, Inc. All rights reserved.
3*
4*Redistribution and use in source and binary forms, with or without modification, are permitted provided
5*that the following conditions are met:
6*1. Redistributions of source code must retain the above copyright notice, this list of conditions and the
7*following disclaimer.
8*2. Redistributions in binary form must reproduce the above copyright notice,
9*this list of conditions and the following disclaimer in the documentation and/or other materials provided
10*with the distribution.
11*
12*THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED
13*WARRANTIES,INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
14*FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
15*FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16*NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
17*BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
18*LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
19*SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
20*
21* $FreeBSD$
22*
23*******************************************************************************/
24/******************************************************************************
25
26Note:
27*******************************************************************************
28Module Name:
29 ostypes.h
30Abstract:
31 Request by fclayer for data type define.
32Authors:
33 EW - Yiding(Eddie) Wang
34Environment:
35 Kernel or loadable module
36
37Version Control Information:
38 $ver. 1.0.0
39
40Revision History:
41 $Revision: 114125 $0.1.0
42 $Date: 2012-04-23 23:37:56 -0700 (Mon, 23 Apr 2012) $09-27-2001
43 $Modtime: 11/12/01 11:15a $15:56:00
44
45Notes:
46**************************** MODIFICATION HISTORY *****************************
47NAME DATE Rev. DESCRIPTION
48---- ---- ---- -----------
49EW 09-16-2002 0.1.0 Header file for most constant definitions
50******************************************************************************/
51
52#ifndef __OSTYPES_H__
53#define __OSTYPES_H__
54
55#include <sys/types.h>
56#include <sys/kernel.h>
57
58
59/*
60** Included for Linux 2.4, built in kernel and other possible cases.
61*/
62/*
63#ifdef TARGET_DRIVER
64#if !defined(AGBUILD_TFE_DRIVER) && !defined(COMBO_IBE_TFE_MODULE)
65#include "lxtgtdef.h"
66#endif
67#endif
68*/
69/*
70** Included for possible lower layer ignorance.
71*/
72#include "osdebug.h"
73
74#ifdef STATIC
75#undef STATIC
76#endif
77
78#define STATIC
79
80#ifndef INLINE
81#define INLINE inline
82#endif
83
84
85#ifndef FORCEINLINE
86#define FORCEINLINE
87//#define FORCEINLINE inline
88
89#endif
90#if defined (__amd64__)
91#define BITS_PER_LONG 64
92#else
93#define BITS_PER_LONG 32
94#endif
95
96
97typedef unsigned char bit8;
98typedef unsigned short bit16;
99typedef unsigned int bit32;
100typedef char sbit8;
101typedef short sbit16;
102typedef int sbit32;
103typedef unsigned int BOOLEAN;
104typedef unsigned long long bit64;
105typedef long long sbit64;
106
107//typedef unsigned long long bitptr;
108#if 1
109#if (BITS_PER_LONG == 64)
110typedef unsigned long long bitptr;
111#else
112typedef unsigned long bitptr;
113#endif
114#endif
115
116typedef char S08;
117typedef short S16;
118typedef int S32;
119typedef long S32_64;
120typedef long long S64;
121
122typedef unsigned char U08;
123typedef unsigned short U16;
124typedef unsigned int U32;
125typedef unsigned long U32_64;
126typedef unsigned long long U64;
127
128/*
129** some really basic defines
130*/
131#define GLOBAL extern
132#define LOCAL static
133#ifndef TRUE
134#define TRUE 1
135#define FALSE 0
136#endif
137#ifndef SUCCESS
138#define SUCCESS 0
139#define FAILURE 1
140#endif
141#ifndef NULL
142#define NULL ((void*)0)
143#endif
144
145
146#define agBOOLEAN BOOLEAN
147#define osGLOBAL GLOBAL
148#define osLOCAL LOCAL
149#define agTRUE TRUE
150#define agFALSE FALSE
151#define agNULL NULL
152
153#define AGTIAPI_UNKNOWN 2
154#define AGTIAPI_SUCCESS 1
155#define AGTIAPI_FAIL 0
156
157#define AGTIAPI_DRIVER_VERSION "1.4.0.10800"
158
159/***************************************************************************
160****************************************************************************
161* MACROS - some basic macros
162****************************************************************************
163***************************************************************************/
164#ifndef BIT
165#define BIT(x) (1<<x)
166#endif
167
168#define osti_sprintf sprintf
169
170#endif /* __OSTYPES_H__ */
unsigned short bit16
Definition: ostypes.h:98
unsigned long long bit64
Definition: ostypes.h:104
char sbit8
Definition: ostypes.h:100
unsigned long long U64
Definition: ostypes.h:126
int sbit32
Definition: ostypes.h:102
unsigned long bitptr
Definition: ostypes.h:112
long long sbit64
Definition: ostypes.h:105
unsigned char U08
Definition: ostypes.h:122
long S32_64
Definition: ostypes.h:119
unsigned long U32_64
Definition: ostypes.h:125
unsigned int bit32
Definition: ostypes.h:99
int S32
Definition: ostypes.h:118
short S16
Definition: ostypes.h:117
short sbit16
Definition: ostypes.h:101
long long S64
Definition: ostypes.h:120
unsigned int U32
Definition: ostypes.h:124
unsigned short U16
Definition: ostypes.h:123
unsigned int BOOLEAN
Definition: ostypes.h:103
unsigned char bit8
Definition: ostypes.h:97
char S08
Definition: ostypes.h:116