aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-01-08 18:56:16 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-01-08 18:56:16 +0000
commit82054b1941729e6c78b13038250a2fa74d03609d (patch)
treecdf9ea36806d08b56fde47eb6db11446f7bd41c2
parentba030d32c3e65ec5d4c6c6eaf7f55d7c61aae0b8 (diff)
downloadChibiOS-82054b1941729e6c78b13038250a2fa74d03609d.tar.gz
ChibiOS-82054b1941729e6c78b13038250a2fa74d03609d.tar.bz2
ChibiOS-82054b1941729e6c78b13038250a2fa74d03609d.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@171 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r--src/chdebug.c2
-rw-r--r--src/include/debug.h2
-rw-r--r--src/include/threads.h9
3 files changed, 7 insertions, 6 deletions
diff --git a/src/chdebug.c b/src/chdebug.c
index 211e1de33..14b57669d 100644
--- a/src/chdebug.c
+++ b/src/chdebug.c
@@ -58,7 +58,7 @@ TraceBuffer dbgtb;
*/
void chDbgTrace(Thread *otp, Thread *ntp) {
- dbgtb.tb_ptr->cse_slpdata = otp->p_common;
+ dbgtb.tb_ptr->cse_wtobjp = otp->p_wtobjp;
#ifdef CH_USE_SYSTEMTIME
dbgtb.tb_ptr->cse_time = chSysGetTime();
#else
diff --git a/src/include/debug.h b/src/include/debug.h
index 3d763d84d..226d80dd6 100644
--- a/src/include/debug.h
+++ b/src/include/debug.h
@@ -37,7 +37,7 @@
#define MEM_FILL_PATTERN 0x55
typedef struct {
- void *cse_slpdata;
+ void *cse_wtobjp;
t_time cse_time;
UWORD16 cse_state: 4;
UWORD16 cse_tid: 12;
diff --git a/src/include/threads.h b/src/include/threads.h
index 37c962793..2d731ee1e 100644
--- a/src/include/threads.h
+++ b/src/include/threads.h
@@ -53,6 +53,10 @@ struct Thread {
* thread in the system.
*/
union {
+#ifdef CH_USE_TRACE
+ /** Kernel object where the thread is waiting on.*/
+ void *p_wtobjp;
+#endif
#ifdef CH_USE_SEMAPHORES
/** Semaphore where the thread is waiting on (only in \p PRWTSEM state).*/
Semaphore *p_wtsemp;
@@ -84,10 +88,7 @@ struct Thread {
/** Machine dependent processor context.*/
Context p_ctx;
/*
- * Start of the optional fields. Note, the null thread may also let its
- * stack overwrite the following fields since it never uses semaphores,
- * events, messages, exit etc, this can save some space on RAM starved
- * systems, be caruful in doing so.
+ * Start of the optional fields.
*/
#ifdef CH_USE_WAITEXIT
/** The list of the threads waiting for this thread termination.*/