1 /* $FreeBSD: src/sys/dev/mpt/mpilib/mpi_type.h,v 1.1.2.2 2002/09/01 23:08:06 mjacob Exp $ */ 2 /* $DragonFly: src/sys/dev/disk/mpt/mpilib/mpi_type.h,v 1.2 2003/06/17 04:28:28 dillon Exp $ */ 3 /* 4 * Copyright (c) 2000, 2001 by LSI Logic Corporation 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * 1. Redistributions of source code must retain the above copyright 10 * notice immediately at the beginning of the file, without modification, 11 * this list of conditions, and the following disclaimer. 12 * 2. The name of the author may not be used to endorse or promote products 13 * derived from this software without specific prior written permission. 14 * 15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 16 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR 19 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * 27 * 28 * Name: MPI_TYPE.H 29 * Title: MPI Basic type definitions 30 * Creation Date: June 6, 2000 31 * 32 * MPI Version: 01.02.01 33 * 34 * Version History 35 * --------------- 36 * 37 * Date Version Description 38 * -------- -------- ------------------------------------------------------ 39 * 05-08-00 00.10.01 Original release for 0.10 spec dated 4/26/2000. 40 * 06-06-00 01.00.01 Update version number for 1.0 release. 41 * 11-02-00 01.01.01 Original release for post 1.0 work 42 * 02-20-01 01.01.02 Added define and ifdef for MPI_POINTER. 43 * 08-08-01 01.02.01 Original release for v1.2 work. 44 * -------------------------------------------------------------------------- 45 */ 46 47 #ifndef MPI_TYPE_H 48 #define MPI_TYPE_H 49 50 51 /******************************************************************************* 52 * Define MPI_POINTER if it hasn't already been defined. By default MPI_POINTER 53 * is defined to be a near pointer. MPI_POINTER can be defined as a far pointer 54 * by defining MPI_POINTER as "far *" before this header file is included. 55 */ 56 #ifndef MPI_POINTER 57 #define MPI_POINTER * 58 #endif 59 60 61 /***************************************************************************** 62 * 63 * B a s i c T y p e s 64 * 65 *****************************************************************************/ 66 67 typedef signed char S8; 68 typedef unsigned char U8; 69 typedef signed short S16; 70 typedef unsigned short U16; 71 72 #if defined(unix) || defined(__arm) || defined(ALPHA) || defined(__GNUC__) 73 74 typedef signed int S32; 75 typedef unsigned int U32; 76 77 #else 78 79 typedef signed long S32; 80 typedef unsigned long U32; 81 82 #endif 83 84 85 typedef struct _S64 86 { 87 U32 Low; 88 S32 High; 89 } S64; 90 91 typedef struct _U64 92 { 93 U32 Low; 94 U32 High; 95 } U64; 96 97 98 /****************************************************************************/ 99 /* Pointers */ 100 /****************************************************************************/ 101 102 typedef S8 *PS8; 103 typedef U8 *PU8; 104 typedef S16 *PS16; 105 typedef U16 *PU16; 106 typedef S32 *PS32; 107 typedef U32 *PU32; 108 typedef S64 *PS64; 109 typedef U64 *PU64; 110 111 112 #endif 113 114