aboutsummaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/ch.h4
-rw-r--r--src/include/debug.h32
-rw-r--r--src/include/threads.h6
3 files changed, 15 insertions, 27 deletions
diff --git a/src/include/ch.h b/src/include/ch.h
index 8303d90f6..ec53b4197 100644
--- a/src/include/ch.h
+++ b/src/include/ch.h
@@ -35,7 +35,7 @@
/**
* Kernel version string.
*/
-#define CH_KERNEL_VERSION "1.1.0unstable"
+#define CH_KERNEL_VERSION "1.1.1unstable"
/**
* Kernel version major number.
@@ -50,7 +50,7 @@
/**
* Kernel version patch number.
*/
-#define CH_KERNEL_PATCH 0
+#define CH_KERNEL_PATCH 1
/*
* Common values.
diff --git a/src/include/debug.h b/src/include/debug.h
index 37400d967..ac9034a8b 100644
--- a/src/include/debug.h
+++ b/src/include/debug.h
@@ -27,8 +27,6 @@
#ifndef _DEBUG_H_
#define _DEBUG_H_
-#if CH_USE_DEBUG
-
/**
* @brief Trace buffer entries.
*/
@@ -62,25 +60,13 @@ typedef struct {
CtxSwcEvent tb_buffer[TRACE_BUFFER_SIZE]; /**< Ring buffer.*/
} TraceBuffer;
-extern CtxSwcEvent *dbgnext;
-extern TraceBuffer dbgtb;
-extern char *dbglastmsg;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
- void debug_init(void);
- void chDbgPanic(char *msg);
-#ifdef __cplusplus
-}
-#endif
-
+#if CH_DBG_ENABLE_ASSERTS
/**
* Condition assertion, if the condition check fails then the kernel panics
* with the specified message.
* @param c the condition to be verified to be true
* @param m the text message
- * @note The condition is tested only if the @p CH_USE_DEBUG switch is
+ * @note The condition is tested only if the @p CH_DBG_ENABLE_ASSERTS switch is
* specified in @p chconf.h else the macro does nothing.
*/
#define chDbgAssert(c, m) { \
@@ -88,23 +74,27 @@ extern "C" {
chDbgPanic(m); \
}
-#else /* !CH_USE_DEBUG */
+#else /* !CH_DBG_ENABLE_ASSERTS */
-#define debug_init()
#define chDbgPanic(msg) {}
#define chDbgAssert(c, m) {(void)(c);}
-#endif /* CH_USE_DEBUG */
+#endif /* !CH_DBG_ENABLE_ASSERTS */
-#if CH_USE_TRACE
#ifdef __cplusplus
extern "C" {
#endif
+#if CH_DBG_ENABLE_TRACE
+ extern TraceBuffer trace_buffer;
void chDbgTrace(Thread *otp, Thread *ntp);
+#endif
+#if CH_DBG_ENABLE_ASSERTS
+ extern char *panic_msg;
+ void chDbgPanic(char *msg);
+#endif
#ifdef __cplusplus
}
#endif
-#endif /* CH_USE_TRACE */
#endif /* _DEBUG_H_ */
diff --git a/src/include/threads.h b/src/include/threads.h
index 29ed7f21f..be48fcbb3 100644
--- a/src/include/threads.h
+++ b/src/include/threads.h
@@ -59,6 +59,8 @@ struct Thread {
msg_t p_rdymsg; /**< Thread wakeup code.*/
msg_t p_exitcode; /**< The thread exit code
(@p PREXIT state).*/
+ void *p_wtobjp; /**< Generic kernel object pointer used
+ for opaque access.*/
#if CH_USE_SEMAPHORES
Semaphore *p_wtsemp; /**< Semaphore where the thread is
waiting on (@p PRWTSEM state).*/
@@ -79,10 +81,6 @@ struct Thread {
eventmask_t p_ewmask; /**< Enabled events mask (@p PRWTOREVT
or @p PRWTANDEVT states).*/
#endif
-#if CH_USE_TRACE
- void *p_wtobjp; /**< Generic kernel object pointer used
- for opaque access.*/
-#endif
};
/*
* Start of the optional fields.