libstdc++
cxxabi_tweaks.h
Go to the documentation of this file.
00001 // Control various target specific ABI tweaks.  Generic version.
00002 
00003 // Copyright (C) 2004, 2006, 2008, 2009, 2011 Free Software Foundation, Inc.
00004 //
00005 // This file is part of the GNU ISO C++ Library.  This library is free
00006 // software; you can redistribute it and/or modify it under the
00007 // terms of the GNU General Public License as published by the
00008 // Free Software Foundation; either version 3, or (at your option)
00009 // any later version.
00010 
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 // GNU General Public License for more details.
00015 
00016 // Under Section 7 of GPL version 3, you are granted additional
00017 // permissions described in the GCC Runtime Library Exception, version
00018 // 3.1, as published by the Free Software Foundation.
00019 
00020 // You should have received a copy of the GNU General Public License and
00021 // a copy of the GCC Runtime Library Exception along with this program;
00022 // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
00023 // <http://www.gnu.org/licenses/>.
00024 
00025 /** @file bits/cxxabi_tweaks.h
00026  *  This is an internal header file, included by other library headers.
00027  *  Do not attempt to use it directly. @headername{cxxabi.h}
00028  */
00029 
00030 #ifndef _CXXABI_TWEAKS_H
00031 #define _CXXABI_TWEAKS_H 1
00032 
00033 #ifdef __cplusplus
00034 namespace __cxxabiv1
00035 {
00036   extern "C" 
00037   {
00038 #endif
00039 
00040   // The generic ABI uses the first byte of a 64-bit guard variable.
00041 #define _GLIBCXX_GUARD_TEST(x) (*(char *) (x) != 0)
00042 #define _GLIBCXX_GUARD_SET(x) *(char *) (x) = 1
00043 #define _GLIBCXX_GUARD_BIT __guard_test_bit (0, 1)
00044 #define _GLIBCXX_GUARD_PENDING_BIT __guard_test_bit (1, 1)
00045 #define _GLIBCXX_GUARD_WAITING_BIT __guard_test_bit (2, 1)
00046   __extension__ typedef int __guard __attribute__((mode (__DI__)));
00047 
00048   // __cxa_vec_ctor has void return type.
00049   typedef void __cxa_vec_ctor_return_type;
00050 #define _GLIBCXX_CXA_VEC_CTOR_RETURN(x) return
00051   // Constructors and destructors do not return a value.
00052   typedef void __cxa_cdtor_return_type;
00053 
00054 #ifdef __cplusplus
00055   }
00056 } // namespace __cxxabiv1
00057 #endif
00058 
00059 #endif