Xenomai API
2.5.6.1
|
00001 /* 00002 * Copyright (C) 2001-2006 Philippe Gerum <[email protected]>. 00003 * 00004 * Xenomai is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published 00006 * by the Free Software Foundation; either version 2 of the License, 00007 * or (at your option) any later version. 00008 * 00009 * Xenomai is distributed in the hope that it will be useful, but 00010 * WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 * General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with Xenomai; if not, write to the Free Software 00016 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 00017 * 02111-1307, USA. 00018 */ 00019 00020 #ifndef _XENO_NUCLEUS_COMPILER_H 00021 #define _XENO_NUCLEUS_COMPILER_H 00022 00023 #if !defined(__IN_XENOMAI__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 0)) 00024 #define __deprecated_call__ __attribute__((deprecated)) 00025 #ifdef __KERNEL__ 00026 #ifdef CONFIG_XENO_OPT_NOWARN_DEPRECATED 00027 #define __deprecated_in_kernel__ 00028 #else 00029 #define __deprecated_in_kernel__ __deprecated_call__ 00030 #endif /* CONFIG_XENO_OPT_NOWARN_DEPRECATED */ 00031 #else 00032 #define __deprecated_in_kernel__ 00033 #endif /* !__KERNEL__ */ 00034 #else /* __IN_XENOMAI__ || !(__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 0)) */ 00035 #define __deprecated_in_kernel__ 00036 #endif /* __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 0) */ 00037 00038 #ifndef likely 00039 #if !defined(__GNUC__) || __GNUC__ == 2 && __GNUC_MINOR__ < 96 00040 #define __builtin_expect(x, v) (x) 00041 #endif /* !gcc or gcc version < 2.96 */ 00042 00043 #define likely(x) __builtin_expect((x) != 0, 1) 00044 #define unlikely(x) __builtin_expect((x) != 0, 0) 00045 #endif /* !defined(likely) */ 00046 00047 #endif /* !_XENO_NUCLEUS_COMPILER_H */