Author: tjansen Date: Thu Nov 26 16:25:21 2009 New Revision: 1820 Log: Moved the PISA_IFEL macro tp pisaperf.c, the only place left using it. Modified: trunk/libpisa/util.h trunk/performance/pisaperf.c Modified: trunk/libpisa/util.h ============================================================================== --- trunk/libpisa/util.h Thu Nov 26 16:21:48 2009 (r1819) +++ trunk/libpisa/util.h Thu Nov 26 16:25:21 2009 (r1820) @@ -20,26 +20,6 @@ #include <sys/types.h> /** - * Use this macro to detect failures and exit function in case - * of such. Variable 'err' must be defined, usually type int. - * Label 'out_err' must be defined, on errors this label is used - * as destination after proper actions. - * - * @param func Nonzero, if failure. - * @param eval Set variable called 'err' to this value. - * @param args Arguments for PISA_ERROR(), use like with printf(). - */ -#define PISA_IFEL(func, eval, args...) \ -{ \ - if (func) { \ - PISA_ERROR(args); \ - err = eval; \ - goto out_err; \ - } \ -} - - -/** * wrapper functions for memory allocation. * for malloc(), realloc() and free(). */ Modified: trunk/performance/pisaperf.c ============================================================================== --- trunk/performance/pisaperf.c Thu Nov 26 16:21:48 2009 (r1819) +++ trunk/performance/pisaperf.c Thu Nov 26 16:25:21 2009 (r1820) @@ -14,7 +14,26 @@ */ #include "pisaperf.h" #include "libpisa/debug.h" -#include "libpisa/util.h" /* PISA_IFEL */ +#include "libpisa/util.h" + +/** + * Use this macro to detect failures and exit function in case + * of such. Variable 'err' must be defined, usually type int. + * Label 'out_err' must be defined, on errors this label is used + * as destination after proper actions. + * + * @param func Nonzero, if failure. + * @param eval Set variable called 'err' to this value. + * @param args Arguments for PISA_ERROR(), use like with printf(). + */ +#define PISA_IFEL(func, eval, args...) \ +{ \ + if (func) { \ + PISA_ERROR(args); \ + err = eval; \ + goto out_err; \ + } \ +} int pisa_perf_enabled(void){ @@ -22,8 +41,6 @@ return 1; } - - /*! * \brief Create a set of performance slots. Each performance measurement type needs a slot. *