aboutsummaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-01-10 13:52:44 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-01-10 13:52:44 +0000
commitc7b67cff0eab340b5c58f168f4b44bdbc38f6d9b (patch)
treef51baef0be515ffbee509a446f0a255f1756b53a /src/include
parent82054b1941729e6c78b13038250a2fa74d03609d (diff)
downloadChibiOS-c7b67cff0eab340b5c58f168f4b44bdbc38f6d9b.tar.gz
ChibiOS-c7b67cff0eab340b5c58f168f4b44bdbc38f6d9b.tar.bz2
ChibiOS-c7b67cff0eab340b5c58f168f4b44bdbc38f6d9b.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@173 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'src/include')
-rw-r--r--src/include/threads.h23
1 files changed, 9 insertions, 14 deletions
diff --git a/src/include/threads.h b/src/include/threads.h
index 2d731ee1e..ba53e6158 100644
--- a/src/include/threads.h
+++ b/src/include/threads.h
@@ -53,10 +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
+ /** Thread wakeup code (only valid when exiting the \p PRREADY state).*/
+ t_msg p_rdymsg;
+ /** The thread exit code (only while in \p PREXIT state).*/
+ t_msg p_exitcode;
#ifdef CH_USE_SEMAPHORES
/** Semaphore where the thread is waiting on (only in \p PRWTSEM state).*/
Semaphore *p_wtsemp;
@@ -69,20 +69,14 @@ struct Thread {
/** Destination thread for message send (only in \p PRSNDMSG state).*/
Thread *p_wtthdp;
#endif
- };
- union {
- /** Thread wakeup code, normally set to \p RDY_OK by the \p chSchReadyI()
- * (only while in \p PRREADY state).*/
- t_msg p_rdymsg;
- /** The thread exit code (only while in \p PREXIT state).*/
- t_msg p_exitcode;
#ifdef CH_USE_EVENTS
/** Enabled events mask (only while in \p PRWTEVENT state).*/
t_eventmask p_ewmask;
#endif
-#ifdef CH_USE_MESSAGES
- /** Message (only while in \p PRSNDMSG state).*/
- t_msg p_msg;
+#ifdef CH_USE_TRACE
+ /** Kernel object where the thread is waiting on. It is only valid when
+ the thread is some sleeping states.*/
+ void *p_wtobjp;
#endif
};
/** Machine dependent processor context.*/
@@ -100,6 +94,7 @@ struct Thread {
#endif
#ifdef CH_USE_MESSAGES
ThreadsQueue p_msgqueue;
+ t_msg p_msg;
#endif
#ifdef CH_USE_EVENTS
/** Pending events mask.*/