[],[enable_libcfs_cdebug='yes'])
AC_MSG_RESULT([$enable_libcfs_cdebug])
if test x$enable_libcfs_cdebug = xyes; then
- AC_DEFINE(CDEBUG_ENABLED, 1, [enable libcfs CDEBUG, CWARN])
-else
- AC_DEFINE(CDEBUG_ENABLED, 0, [disable libcfs CDEBUG, CWARN])
+ AC_DEFINE(CDEBUG_ENABLED, 1, [enable libcfs CDEBUG, CWARN])
fi
AC_MSG_CHECKING([whether to enable ENTRY/EXIT])
[],[enable_libcfs_trace='yes'])
AC_MSG_RESULT([$enable_libcfs_trace])
if test x$enable_libcfs_trace = xyes; then
- AC_DEFINE(CDEBUG_ENTRY_EXIT, 1, [enable libcfs ENTRY/EXIT])
-else
- AC_DEFINE(CDEBUG_ENTRY_EXIT, 0, [disable libcfs ENTRY/EXIT])
+ AC_DEFINE(CDEBUG_ENTRY_EXIT, 1, [enable libcfs ENTRY/EXIT])
fi
AC_MSG_CHECKING([whether to enable LASSERT, LASSERTF])
#define LCONSOLE_EMERG(format, ...) CDEBUG(D_CONSOLE | D_EMERG, format, ## __VA_ARGS__)
-#ifdef CDEBUG_ENABLED
+#ifdef CDEBUG_ENTRY_EXIT
-void libcfs_log_goto(struct libcfs_debug_msg_data *, const char *, long_ptr_t);
-#define GOTO(label, rc) \
-do { \
- if (cfs_cdebug_show(D_TRACE, DEBUG_SUBSYSTEM)) { \
- LIBCFS_DEBUG_MSG_DATA_DECL(msgdata, D_TRACE, NULL); \
- libcfs_log_goto(&msgdata, #label, (long_ptr_t)(rc)); \
- } else { \
- (void)(rc); \
- } \
- goto label; \
-} while (0)
-#else
-#define GOTO(label, rc) do { ((void)(rc)); goto label; } while (0)
-#endif
+void libcfs_log_goto(struct libcfs_debug_msg_data *goto_data,
+ const char *label, long_ptr_t rc);
-#ifdef CDEBUG_ENTRY_EXIT
+# define GOTO(label, rc) \
+do { \
+ if (cfs_cdebug_show(D_TRACE, DEBUG_SUBSYSTEM)) { \
+ LIBCFS_DEBUG_MSG_DATA_DECL(_goto_data, D_TRACE, NULL); \
+ libcfs_log_goto(&_goto_data, #label, (long_ptr_t)(rc)); \
+ } else { \
+ (void)(rc); \
+ } \
+ \
+ goto label; \
+} while (0)
/*
* if rc == NULL, we need to code as RETURN((void *)NULL), otherwise
} while(0)
#else /* !CDEBUG_ENTRY_EXIT */
+# define GOTO(label, rc) \
+ do { \
+ ((void)(rc)); \
+ goto label; \
+ } while (0)
+
#define RETURN(rc) return (rc)
#define ENTRY do { } while (0)
#define EXIT do { } while (0)