mpi_type.h revision 331722
1203134Sthompsa/* $FreeBSD: stable/11/sys/dev/mpt/mpilib/mpi_type.h 331722 2018-03-29 02:50:57Z eadler $ */
2203134Sthompsa/*
3203134Sthompsa * Copyright (c) 2000-2010, LSI Logic Corporation and its contributors.
4203134Sthompsa * All rights reserved.
5203134Sthompsa *
6203134Sthompsa * Redistribution and use in source and binary forms, with or without
7203134Sthompsa * modification, are permitted provided that the following conditions are
8203134Sthompsa * met:
9203134Sthompsa * 1. Redistributions of source code must retain the above copyright
10203134Sthompsa *    notice, this list of conditions and the following disclaimer.
11203134Sthompsa * 2. Redistributions in binary form must reproduce at minimum a disclaimer
12203134Sthompsa *    substantially similar to the "NO WARRANTY" disclaimer below
13203134Sthompsa *    ("Disclaimer") and any redistribution must be conditioned upon including
14203134Sthompsa *    a substantially similar Disclaimer requirement for further binary
15203134Sthompsa *    redistribution.
16203134Sthompsa * 3. Neither the name of the LSI Logic Corporation nor the names of its
17203134Sthompsa *    contributors may be used to endorse or promote products derived from
18203134Sthompsa *    this software without specific prior written permission.
19203134Sthompsa *
20203134Sthompsa * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21203134Sthompsa * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22203134Sthompsa * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23203134Sthompsa * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
24203134Sthompsa * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25259546Skevlo * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26259546Skevlo * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27203134Sthompsa * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28259546Skevlo * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29203134Sthompsa * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF THE COPYRIGHT
30203134Sthompsa * OWNER OR CONTRIBUTOR IS ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31259546Skevlo *
32259546Skevlo *
33259546Skevlo *           Name:  mpi_type.h
34259546Skevlo *          Title:  MPI Basic type definitions
35259546Skevlo *  Creation Date:  June 6, 2000
36259546Skevlo *
37259546Skevlo *    mpi_type.h Version:  01.05.02
38259546Skevlo *
39259546Skevlo *  Version History
40259546Skevlo *  ---------------
41259546Skevlo *
42259546Skevlo *  Date      Version   Description
43259546Skevlo *  --------  --------  ------------------------------------------------------
44259546Skevlo *  05-08-00  00.10.01  Original release for 0.10 spec dated 4/26/2000.
45259546Skevlo *  06-06-00  01.00.01  Update version number for 1.0 release.
46259546Skevlo *  11-02-00  01.01.01  Original release for post 1.0 work
47259546Skevlo *  02-20-01  01.01.02  Added define and ifdef for MPI_POINTER.
48259546Skevlo *  08-08-01  01.02.01  Original release for v1.2 work.
49259546Skevlo *  05-11-04  01.03.01  Original release for MPI v1.3.
50259546Skevlo *  08-19-04  01.05.01  Original release for MPI v1.5.
51259546Skevlo *  08-30-05  01.05.02  Added PowerPC option to #ifdef's.
52259546Skevlo *  --------------------------------------------------------------------------
53203134Sthompsa */
54203134Sthompsa
55259546Skevlo#ifndef MPI_TYPE_H
56259546Skevlo#define MPI_TYPE_H
57259546Skevlo
58259546Skevlo
59259546Skevlo/*******************************************************************************
60259546Skevlo * Define MPI_POINTER if it hasn't already been defined. By default MPI_POINTER
61259546Skevlo * is defined to be a near pointer. MPI_POINTER can be defined as a far pointer
62259546Skevlo * by defining MPI_POINTER as "far *" before this header file is included.
63259546Skevlo */
64259546Skevlo#ifndef MPI_POINTER
65259546Skevlo#define MPI_POINTER     *
66259546Skevlo#endif
67259546Skevlo
68259546Skevlo
69259546Skevlo/*****************************************************************************
70203134Sthompsa*
71203134Sthompsa*               B a s i c    T y p e s
72259546Skevlo*
73259546Skevlo*****************************************************************************/
74259546Skevlo
75259546Skevlotypedef signed   char   S8;
76259546Skevlotypedef unsigned char   U8;
77259546Skevlotypedef signed   short  S16;
78259546Skevlotypedef unsigned short  U16;
79259546Skevlo
80203134Sthompsa#ifdef	__FreeBSD__
81259032Skevlo
82259546Skevlotypedef int32_t  S32;
83259032Skevlotypedef uint32_t U32;
84203134Sthompsa
85259546Skevlo#else
86259546Skevlo
87259546Skevlo#if defined(__unix__) || defined(__arm) || defined(ALPHA) || defined(__PPC__) || defined(__ppc)
88259546Skevlo
89259546Skevlo    typedef signed   int   S32;
90259546Skevlo    typedef unsigned int   U32;
91259546Skevlo
92259546Skevlo#else
93259546Skevlo
94259546Skevlo    typedef signed   long  S32;
95259546Skevlo    typedef unsigned long  U32;
96259546Skevlo
97203134Sthompsa#endif
98203134Sthompsa#endif
99259546Skevlo
100203134Sthompsa
101203134Sthompsatypedef struct _S64
102259546Skevlo{
103259546Skevlo    U32          Low;
104259546Skevlo    S32          High;
105259546Skevlo} S64;
106259546Skevlo
107259546Skevlotypedef struct _U64
108259546Skevlo{
109259546Skevlo    U32          Low;
110259546Skevlo    U32          High;
111259546Skevlo} U64;
112259546Skevlo
113259546Skevlo
114259546Skevlo/****************************************************************************/
115203134Sthompsa/*  Pointers                                                                */
116203134Sthompsa/****************************************************************************/
117259546Skevlo
118259546Skevlotypedef S8      *PS8;
119259546Skevlotypedef U8      *PU8;
120203134Sthompsatypedef S16     *PS16;
121203134Sthompsatypedef U16     *PU16;
122259546Skevlotypedef S32     *PS32;
123259546Skevlotypedef U32     *PU32;
124259546Skevlotypedef S64     *PS64;
125259546Skevlotypedef U64     *PU64;
126259546Skevlo
127259546Skevlo
128259546Skevlo#endif
129259546Skevlo
130259546Skevlo