From 82054b1941729e6c78b13038250a2fa74d03609d Mon Sep 17 00:00:00 2001 From: gdisirio Date: Tue, 8 Jan 2008 18:56:16 +0000 Subject: [PATCH] git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@171 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- src/chdebug.c | 2 +- src/include/debug.h | 2 +- src/include/threads.h | 9 +++++---- 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.*/