/* * Copyright (c) Dialogic(R), 2010 * This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. * You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #ifndef __CHAN_CAPI_PLATFORM_H__ #define __CHAN_CAPI_PLATFORM_H__ #if __GNUC__ >= 3 /* { */ #ifndef likely #define likely(x) __builtin_expect(!!(x), 1) #endif #ifndef unlikely #define unlikely(x) __builtin_expect(!!(x), 0) #endif #else /* } { */ #ifndef likely #define likely(__x__) (!!(__x__)) #endif #ifndef unlikely #define unlikely(__x__) (!!(__x__)) #endif #endif /* } */ #endif