summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems/status-checks.h
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-07-10 15:05:31 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-07-10 15:05:31 +0000
commita5d5c746f076f3e3309aafc47091b8a372b3c55e (patch)
tree6320fcb22100c8b98d60a172340002abf8142499 /cpukit/include/rtems/status-checks.h
parentadded irq-extension.h declarations (diff)
downloadrtems-a5d5c746f076f3e3309aafc47091b8a372b3c55e.tar.bz2
2008-07-10 Joel Sherrill <joel.sherrill@OARcorp.com>
* include/rtems/status-checks.h: Fix style.
Diffstat (limited to 'cpukit/include/rtems/status-checks.h')
-rw-r--r--cpukit/include/rtems/status-checks.h275
1 files changed, 143 insertions, 132 deletions
diff --git a/cpukit/include/rtems/status-checks.h b/cpukit/include/rtems/status-checks.h
index b062c97e3c..7c7754f7b0 100644
--- a/cpukit/include/rtems/status-checks.h
+++ b/cpukit/include/rtems/status-checks.h
@@ -24,150 +24,161 @@ extern "C" {
#endif /* __cplusplus */
#ifdef DEBUG
-# ifndef DEBUG_PRINT
-# ifdef RTEMS_STATUS_CHECKS_USE_PRINTK
-# define DEBUG_PRINT( fmt, ...) printk( "%s: " fmt, __func__, ##__VA_ARGS__)
-# else /* RTEMS_STATUS_CHECKS_USE_PRINTK */
-# define DEBUG_PRINT( fmt, ...) printf( "%s: " fmt, __func__, ##__VA_ARGS__)
-# endif /* RTEMS_STATUS_CHECKS_USE_PRINTK */
-# endif /* DEBUG_PRINT */
+ #ifndef DEBUG_PRINT
+ #ifdef RTEMS_STATUS_CHECKS_USE_PRINTK
+ #define DEBUG_PRINT( fmt, ...) \
+ printk( "%s: " fmt, __func__, ##__VA_ARGS__)
+ #else /* RTEMS_STATUS_CHECKS_USE_PRINTK */
+ #define DEBUG_PRINT( fmt, ...) \
+ printf( "%s: " fmt, __func__, ##__VA_ARGS__)
+ #endif /* RTEMS_STATUS_CHECKS_USE_PRINTK */
+ #endif /* DEBUG_PRINT */
#else /* DEBUG */
-# define DEBUG_PRINT( fmt, ...)
+ #define DEBUG_PRINT( fmt, ...)
#endif /* DEBUG */
#ifndef SYSLOG_PRINT
-# ifdef RTEMS_STATUS_CHECKS_USE_PRINTK
-# define SYSLOG_PRINT( fmt, ...) printk( fmt, ##__VA_ARGS__)
-# else /* RTEMS_STATUS_CHECKS_USE_PRINTK */
-# define SYSLOG_PRINT( fmt, ...) printf( fmt, ##__VA_ARGS__)
-# endif /* RTEMS_STATUS_CHECKS_USE_PRINTK */
+ #ifdef RTEMS_STATUS_CHECKS_USE_PRINTK
+ #define SYSLOG_PRINT( fmt, ...) printk( fmt, ##__VA_ARGS__)
+ #else /* RTEMS_STATUS_CHECKS_USE_PRINTK */
+ #define SYSLOG_PRINT( fmt, ...) printf( fmt, ##__VA_ARGS__)
+ #endif /* RTEMS_STATUS_CHECKS_USE_PRINTK */
#endif /* SYSLOG_PRINT */
-#define SYSLOG( fmt, ...) SYSLOG_PRINT( "%s: " fmt, __func__, ##__VA_ARGS__)
+#define SYSLOG( fmt, ...) \
+ SYSLOG_PRINT( "%s: " fmt, __func__, ##__VA_ARGS__)
-#define SYSLOG_WARNING( fmt, ...) SYSLOG_PRINT( "%s: Warning: " fmt, __func__, ##__VA_ARGS__)
+#define SYSLOG_WARNING( fmt, ...) \
+ SYSLOG_PRINT( "%s: Warning: " fmt, __func__, ##__VA_ARGS__)
#define SYSLOG_WARNING_SC( sc, fmt, ...) \
-if ((sc) != RTEMS_SUCCESSFUL) { \
- SYSLOG_PRINT( "%s: Warning: SC = %i: " fmt "\n", __func__, sc, ##__VA_ARGS__); \
-}
+ if ((sc) != RTEMS_SUCCESSFUL) { \
+ SYSLOG_PRINT( "%s: Warning: SC = %i: " fmt "\n", \
+ __func__, sc, ##__VA_ARGS__); \
+ }
-#define SYSLOG_ERROR( fmt, ...) SYSLOG_PRINT( "%s: Error: " fmt, __func__, ##__VA_ARGS__)
+#define SYSLOG_ERROR( fmt, ...) \
+ SYSLOG_PRINT( "%s: Error: " fmt, __func__, ##__VA_ARGS__)
#define SYSLOG_ERROR_SC( sc, fmt, ...) \
-if ((sc) != RTEMS_SUCCESSFUL) { \
- SYSLOG_PRINT( "%s: Error: SC = %i: " fmt "\n", __func__, sc, ##__VA_ARGS__); \
-}
-
-#define CHECK_SC( sc, hint) \
-if ((sc) != RTEMS_SUCCESSFUL) { \
- SYSLOG_ERROR( "SC = %i: %s\n", sc, hint); \
- return sc; \
-} else { \
- DEBUG_PRINT( "Ok: %s\n", hint); \
-}
-
-#define CHECK_SCRV( sc, hint) \
-if ((sc) != RTEMS_SUCCESSFUL) { \
- SYSLOG_ERROR( "SC = %i: %s\n", sc, hint); \
- return -(sc); \
-} else { \
- DEBUG_PRINT( "Ok: %s\n", hint); \
-}
-
-#define CHECK_SC_VOID( sc, hint) \
-if ((sc) != RTEMS_SUCCESSFUL) { \
- SYSLOG_ERROR( "SC = %i: %s\n", sc, hint); \
- return; \
-} else { \
- DEBUG_PRINT( "Ok: %s\n", hint); \
-}
-
-#define CHECK_SC_TASK( sc, hint) \
-if ((sc) != RTEMS_SUCCESSFUL) { \
- SYSLOG_ERROR( "SC = %i: %s\n", sc, hint); \
- rtems_task_delete( RTEMS_SELF); \
- return; \
-} else { \
- DEBUG_PRINT( "Ok: %s\n", hint); \
-}
-
-#define CHECK_RV( rv, hint) \
-if ((rv) < 0) { \
- SYSLOG_ERROR( "RV = %i: %s\n", rv, hint); \
- return rv; \
-} else { \
- DEBUG_PRINT( "Ok: %s\n", hint); \
-}
-
-#define CHECK_RVSC( rv, hint) \
-if ((rv) < 0) { \
- SYSLOG_ERROR( "RV = %i: %s\n", rv, hint); \
- return RTEMS_IO_ERROR; \
-} else { \
- DEBUG_PRINT( "Ok: %s\n", hint); \
-}
-
-#define CHECK_RV_VOID( rv, hint) \
-if ((rv) < 0) { \
- SYSLOG_ERROR( "RV = %i: %s\n", rv, hint); \
- return; \
-} else { \
- DEBUG_PRINT( "Ok: %s\n", hint); \
-}
-
-#define CHECK_RV_TASK( rv, hint) \
-if ((rv) < 0) { \
- SYSLOG_ERROR( "RV = %i: %s\n", rv, hint); \
- rtems_task_delete( RTEMS_SELF); \
- return; \
-} else { \
- DEBUG_PRINT( "Ok: %s\n", hint); \
-}
-
-#define CLEANUP_SC( sc, label, hint) \
-if ((sc) != RTEMS_SUCCESSFUL) { \
- SYSLOG_ERROR( "SC = %i: %s\n", sc, hint); \
- goto label; \
-} else { \
- DEBUG_PRINT( "Ok: %s\n", hint); \
-}
-
-#define CLEANUP_SCRV( sc, rv, label, hint) \
-if ((sc) != RTEMS_SUCCESSFUL) { \
- SYSLOG_ERROR( "SC = %i: %s\n", sc, hint); \
- rv = -(sc); \
- goto label; \
-} else { \
- DEBUG_PRINT( "Ok: %s\n", hint); \
-}
-
-#define CLEANUP_RV( rv, label, hint) \
-if ((rv) < 0) { \
- SYSLOG_ERROR( "RV = %i: %s\n", rv, hint); \
- goto label; \
-} else { \
- DEBUG_PRINT( "Ok: %s\n", hint); \
-}
-
-#define CLEANUP_RVSC( rv, sc, label, hint) \
-if ((rv) < 0) { \
- SYSLOG_ERROR( "RV = %i: %s\n", rv, hint); \
- sc = RTEMS_IO_ERROR; \
- goto label; \
-} else { \
- DEBUG_PRINT( "Ok: %s\n", hint); \
-}
-
-#define DO_CLEANUP_SC( val, sc, label, hint) \
- sc = val; \
- SYSLOG_ERROR( "SC = %i: %s\n", sc, hint); \
- goto label;
-
-#define DO_CLEANUP_RV( val, rv, label, hint) \
- rv = val; \
- SYSLOG_ERROR( "RV = %i: %s\n", rv, hint); \
- goto label;
+ if ((sc) != RTEMS_SUCCESSFUL) { \
+ SYSLOG_PRINT( "%s: Error: SC = %i: " fmt "\n", \
+ __func__, sc, ##__VA_ARGS__); \
+ }
+
+#define CHECK_SC( sc, hint ) \
+ if ((sc) != RTEMS_SUCCESSFUL) { \
+ SYSLOG_ERROR( "SC = %i: %s\n", sc, hint ); \
+ return sc; \
+ } else { \
+ DEBUG_PRINT( "Ok: %s\n", hint ); \
+ }
+
+#define CHECK_SCRV( sc, hint ) \
+ if ((sc) != RTEMS_SUCCESSFUL) { \
+ SYSLOG_ERROR( "SC = %i: %s\n", sc, hint ); \
+ return -(sc); \
+ } else { \
+ DEBUG_PRINT( "Ok: %s\n", hint ); \
+ }
+
+#define CHECK_SC_VOID( sc, hint ) \
+ if ((sc) != RTEMS_SUCCESSFUL) { \
+ SYSLOG_ERROR( "SC = %i: %s\n", sc, hint ); \
+ return; \
+ } else { \
+ DEBUG_PRINT( "Ok: %s\n", hint ); \
+ }
+
+#define CHECK_SC_TASK( sc, hint ) \
+ if ((sc) != RTEMS_SUCCESSFUL) { \
+ SYSLOG_ERROR( "SC = %i: %s\n", sc, hint ); \
+ rtems_task_delete( RTEMS_SELF); \
+ return; \
+ } else { \
+ DEBUG_PRINT( "Ok: %s\n", hint ); \
+ }
+
+#define CHECK_RV( rv, hint ) \
+ if ((rv) < 0) { \
+ SYSLOG_ERROR( "RV = %i: %s\n", rv, hint ); \
+ return rv; \
+ } else { \
+ DEBUG_PRINT( "Ok: %s\n", hint ); \
+ }
+
+#define CHECK_RVSC( rv, hint ) \
+ if ((rv) < 0) { \
+ SYSLOG_ERROR( "RV = %i: %s\n", rv, hint ); \
+ return RTEMS_IO_ERROR; \
+ } else { \
+ DEBUG_PRINT( "Ok: %s\n", hint ); \
+ }
+
+#define CHECK_RV_VOID( rv, hint ) \
+ if ((rv) < 0) { \
+ SYSLOG_ERROR( "RV = %i: %s\n", rv, hint ); \
+ return; \
+ } else { \
+ DEBUG_PRINT( "Ok: %s\n", hint ); \
+ }
+
+#define CHECK_RV_TASK( rv, hint ) \
+ if ((rv) < 0) { \
+ SYSLOG_ERROR( "RV = %i: %s\n", rv, hint ); \
+ rtems_task_delete( RTEMS_SELF); \
+ return; \
+ } else { \
+ DEBUG_PRINT( "Ok: %s\n", hint ); \
+ }
+
+#define CLEANUP_SC( sc, label, hint ) \
+ if ((sc) != RTEMS_SUCCESSFUL) { \
+ SYSLOG_ERROR( "SC = %i: %s\n", sc, hint ); \
+ goto label; \
+ } else { \
+ DEBUG_PRINT( "Ok: %s\n", hint ); \
+ }
+
+#define CLEANUP_SCRV( sc, rv, label, hint ) \
+ if ((sc) != RTEMS_SUCCESSFUL) { \
+ SYSLOG_ERROR( "SC = %i: %s\n", sc, hint ); \
+ rv = -(sc); \
+ goto label; \
+ } else { \
+ DEBUG_PRINT( "Ok: %s\n", hint ); \
+ }
+
+#define CLEANUP_RV( rv, label, hint ) \
+ if ((rv) < 0) { \
+ SYSLOG_ERROR( "RV = %i: %s\n", rv, hint ); \
+ goto label; \
+ } else { \
+ DEBUG_PRINT( "Ok: %s\n", hint ); \
+ }
+
+#define CLEANUP_RVSC( rv, sc, label, hint ) \
+ if ((rv) < 0) { \
+ SYSLOG_ERROR( "RV = %i: %s\n", rv, hint ); \
+ sc = RTEMS_IO_ERROR; \
+ goto label; \
+ } else { \
+ DEBUG_PRINT( "Ok: %s\n", hint ); \
+ }
+
+#define DO_CLEANUP_SC( val, sc, label, hint ) \
+ do { \
+ sc = val; \
+ SYSLOG_ERROR( "SC = %i: %s\n", sc, hint ); \
+ goto label; \
+ } while (0)
+
+#define DO_CLEANUP_RV( val, rv, label, hint ) \
+ do { \
+ rv = val; \
+ SYSLOG_ERROR( "RV = %i: %s\n", rv, hint ); \
+ goto label;
+ } while (0)
#ifdef __cplusplus
}