github.com/jlmucb/cloudproxy@v0.0.0-20170830161738-b5aa0b619bc4/cpvmm/vmm/bootstrap/bootstrap_types.h (about)

     1  /*
     2   * bootstrap_types.h:  types for bootstrap
     3   * Author: John Manferdelli 
     4   *
     5   * Copyright (c) 2010, Intel Corporation
     6   * All rights reserved.
     7   *
     8   * Redistribution and use in source and binary forms, with or without
     9   * modification, are permitted provided that the following conditions
    10   * are met:
    11   *
    12   *   * Redistributions of source code must retain the above copyright
    13   *     notice, this list of conditions and the following disclaimer.
    14   *   * Redistributions in binary form must reproduce the above
    15   *     copyright notice, this list of conditions and the following
    16   *     disclaimer in the documentation and/or other materials provided
    17   *     with the distribution.
    18   *   * Neither the name of the Intel Corporation nor the names of its
    19   *     contributors may be used to endorse or promote products derived
    20   *     from this software without specific prior written permission.
    21   *
    22   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    23   * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    24   * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
    25   * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
    26   * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
    27   * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
    28   * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
    29   * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    30   * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
    31   * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    32   * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
    33   * OF THE POSSIBILITY OF SUCH DAMAGE.
    34   *
    35   */
    36  
    37  #ifndef __BOOTSTRAP_TYPES_H__
    38  #define __BOOTSTRAP_TYPES_H__
    39  
    40  #define NULL ((void*)0)
    41  
    42  typedef unsigned char      uint8_t;
    43  typedef unsigned short     uint16_t;
    44  typedef unsigned int       uint32_t;
    45  typedef long long unsigned uint64_t;
    46  
    47  typedef int                 bool;
    48  typedef unsigned char       u8;
    49  typedef unsigned short      u16;
    50  typedef unsigned int        u32;
    51  typedef long long unsigned  u64;
    52  
    53  typedef signed short        s16;
    54  
    55  typedef unsigned char       u_char;
    56  
    57  typedef unsigned int        u_int;
    58  
    59  typedef unsigned char       u_int8_t;
    60  typedef unsigned short      u_int16_t;
    61  typedef unsigned int        u_int32_t;
    62  
    63  #ifndef false
    64  #define false 0
    65  #define true 1
    66  #endif
    67  
    68  #define BYTES_PER_LONG 4
    69  
    70  #if __GNUC__ > 3
    71  #define offsetof(type, field) __builtin_offsetof(type, field)
    72  #else
    73  #define offsetof(type, member) ((size_t) &((type *)0)->member)
    74  #endif
    75  
    76  #define LOOP_FOREVER while(1);
    77  
    78  #endif 
    79