diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2008-01-08 13:41:04 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2008-01-08 13:41:04 +0000 |
commit | ba030d32c3e65ec5d4c6c6eaf7f55d7c61aae0b8 (patch) | |
tree | 8a1636ebb9308dbf17db0f30d8ecf5dc03587cb6 /src/include | |
parent | 79194eae8e198e6a480dcb5d6e5c57b28af07f0b (diff) | |
download | ChibiOS-ba030d32c3e65ec5d4c6c6eaf7f55d7c61aae0b8.tar.gz ChibiOS-ba030d32c3e65ec5d4c6c6eaf7f55d7c61aae0b8.tar.bz2 ChibiOS-ba030d32c3e65ec5d4c6c6eaf7f55d7c61aae0b8.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@170 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/threads.h | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/src/include/threads.h b/src/include/threads.h index 8b862f4f3..37c962793 100644 --- a/src/include/threads.h +++ b/src/include/threads.h @@ -48,23 +48,30 @@ struct Thread { /** Mode flags.*/
t_tmode p_flags;
/*
- * The following fields are merged in an union because they are all
+ * The following fields are merged in unions because they are all
* state-specific fields. This trick saves some extra space for each
* thread in the system.
*/
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_SEMAPHORES
/** Semaphore where the thread is waiting on (only in \p PRWTSEM state).*/
- Semaphore *p_semp;
+ Semaphore *p_wtsemp;
#endif
#ifdef CH_USE_MUTEXES
- Mutex *p_mtxp;
+ /** Mutex where the thread is waiting on (only in \p PRWTMTX state).*/
+ Mutex *p_wtmtxp;
+#endif
+#ifdef CH_USE_MESSAGES
+ /** 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;
@@ -73,8 +80,6 @@ struct Thread { /** Message (only while in \p PRSNDMSG state).*/
t_msg p_msg;
#endif
- /** Generic way to access the union.*/
- void *p_common;
};
/** Machine dependent processor context.*/
Context p_ctx;
|