diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-12-01 13:00:37 -0800 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-12-01 13:00:37 -0800 |
commit | a7da5662d93b163c4b264622efcc11852475d463 (patch) | |
tree | 431511ae076a3fc6d389c80131889a51220621d7 /lib/log.h | |
parent | 24b16fb480887cab0bda613ef8c03a0d15272128 (diff) | |
download | quagga-a7da5662d93b163c4b264622efcc11852475d463.tar.bz2 quagga-a7da5662d93b163c4b264622efcc11852475d463.tar.xz |
Revert "Add compiler directive to mark code paths that log as cold"
This reverts commit ebc04ce20a871c99dbb116a4fbada967dd750c43.
Don't really need this and it would be too hard to convince upstream
to take it.
Diffstat (limited to 'lib/log.h')
-rw-r--r-- | lib/log.h | 37 |
1 files changed, 11 insertions, 26 deletions
@@ -105,48 +105,33 @@ extern void closezlog (struct zlog *zl); /* GCC have printf type attribute check. */ #ifdef __GNUC__ -#define PRINTF_ATTRIBUTE(a,b) __attribute__ ((format (printf, a, b))) +#define PRINTF_ATTRIBUTE(a,b) __attribute__ ((__format__ (__printf__, a, b))) #else #define PRINTF_ATTRIBUTE(a,b) #endif /* __GNUC__ */ -#if !(__GNUC__ == 4) -/* Mark functions as cold. gcc will assume any path leading to a call - to them will be unlikely. This means a lot of paths leading up - to log messages are easily marked as not likely. -*/ -#define COLD_ATTRIBUTE __attribute__((__cold__)) -#else -#define COLD_ATTRIBUTE -#endif - /* Generic function for zlog. */ extern void zlog (struct zlog *zl, int priority, const char *format, ...) PRINTF_ATTRIBUTE(3, 4); /* Handy zlog functions. */ -extern void zlog_err (const char *format, ...) - PRINTF_ATTRIBUTE(1, 2) COLD_ATTRIBUTE; -extern void zlog_warn (const char *format, ...) - PRINTF_ATTRIBUTE(1, 2) COLD_ATTRIBUTE; -extern void zlog_info (const char *format, ...) - PRINTF_ATTRIBUTE(1, 2) COLD_ATTRIBUTE; -extern void zlog_notice (const char *format, ...) - PRINTF_ATTRIBUTE(1, 2) COLD_ATTRIBUTE; -extern void zlog_debug (const char *format, ...) - PRINTF_ATTRIBUTE(1, 2) COLD_ATTRIBUTE; +extern void zlog_err (const char *format, ...) PRINTF_ATTRIBUTE(1, 2); +extern void zlog_warn (const char *format, ...) PRINTF_ATTRIBUTE(1, 2); +extern void zlog_info (const char *format, ...) PRINTF_ATTRIBUTE(1, 2); +extern void zlog_notice (const char *format, ...) PRINTF_ATTRIBUTE(1, 2); +extern void zlog_debug (const char *format, ...) PRINTF_ATTRIBUTE(1, 2); /* For bgpd's peer oriented log. */ extern void plog_err (struct zlog *, const char *format, ...) - PRINTF_ATTRIBUTE(2, 3) COLD_ATTRIBUTE; + PRINTF_ATTRIBUTE(2, 3); extern void plog_warn (struct zlog *, const char *format, ...) - PRINTF_ATTRIBUTE(2, 3) COLD_ATTRIBUTE; + PRINTF_ATTRIBUTE(2, 3); extern void plog_info (struct zlog *, const char *format, ...) - PRINTF_ATTRIBUTE(2, 3) COLD_ATTRIBUTE; + PRINTF_ATTRIBUTE(2, 3); extern void plog_notice (struct zlog *, const char *format, ...) - PRINTF_ATTRIBUTE(2, 3) COLD_ATTRIBUTE; + PRINTF_ATTRIBUTE(2, 3); extern void plog_debug (struct zlog *, const char *format, ...) - PRINTF_ATTRIBUTE(2, 3) COLD_ATTRIBUTE; + PRINTF_ATTRIBUTE(2, 3); /* Set logging level for the given destination. If the log_level argument is ZLOG_DISABLED, then the destination is disabled. |