gonzui


Format: Advanced Search

tkernel_2/include/machine.hbare sourcepermlink (0.02 seconds)

Search this content:

    1: /*
    2:  *----------------------------------------------------------------------
    3:  *    T-Kernel 2.0 Software Package
    4:  *
    5:  *    Copyright 2011 by Ken Sakamura.
    6:  *    This software is distributed under the latest version of T-License 2.x.
    7:  *----------------------------------------------------------------------
    8:  *
    9:  *    Released by T-Engine Forum(http://www.t-engine.org/) at 2011/05/17.
   10:  *    Modified by TRON Forum(http://www.tron.org/) at 2015/06/01.
   11:  *
   12:  *----------------------------------------------------------------------
   13:  */
   14: 
   15: /*
   16:  *      @(#)machine.h
   17:  *
   18:  *      Machine type definition
   19:  *
   20:  *      Describes differences between platforms, such as hardware
   21:  *      and OS. Where the source code must be differentiated
   22:  *      according to platform, macros and other definitions given
   23:  *      here should be used.
   24:  *
   25:  *      Where possible, classifications should be based on general
   26:  *      attributes rather than the machine type. Thus, the endian,
   27:  *      for instance, should be described as BIGENDIAN rather than
   28:  *      using a classification based on the machine type.
   29:  *
   30:  *      * Machine type definition is not used solely by the machine
   31:  *      C language source file, so non-macro definitions are not
   32:  *      permitted.
   33:  */
   34: 
   35: #ifndef __MACHINE_H__
   36: #define __MACHINE_H__
   37: 
   38: /* ===== System dependencies definitions ================================ */
   39: 
   40: #include <sys/sysdepend/machine_common.h>
   41: 
   42: /* ===== Common definitions ============================================= */
   43: 
   44: #ifndef Inline
   45: #ifdef __cplusplus
   46: #define Inline          inline
   47: #else
   48: #define Inline          static __inline__
   49: #endif
   50: #endif
   51: 
   52: #ifndef Asm
   53: #ifdef __GNUC__
   54: #define Asm             __asm__ volatile
   55: #endif
   56: #endif
   57: 
   58: /*
   59:  * C symbol format
   60:  *      _Csym = 0    do not append _
   61:  *      _Csym = 1    append _
   62:  *
   63:  *      * In the UNIX System V Release 4 C compiler,
   64:  *         _ is not appended to symbols.
   65:  */
   66: #if _Csym == 0
   67: #define Csym(sym)       sym
   68: #else
   69: #define Csym(sym)       _##sym
   70: #endif
   71: 
   72: #endif /* __MACHINE_H__ */