summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-01-31 09:37:54 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-01-31 09:38:07 +0100
commit70488f5655079bcbf19f55999adbbc51a30f46ad (patch)
treeb207b91cebe8124e8bbb3aad669c88e04d2366d2
parentsprmsched01/spedfsched04: Revise (diff)
downloadrtems-70488f5655079bcbf19f55999adbbc51a30f46ad.tar.bz2
score: Fix _Thread_Initialize()
-rw-r--r--cpukit/score/include/rtems/score/thread.h3
-rw-r--r--cpukit/score/src/threadinitialize.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/cpukit/score/include/rtems/score/thread.h b/cpukit/score/include/rtems/score/thread.h
index c114c91832..8aa141de85 100644
--- a/cpukit/score/include/rtems/score/thread.h
+++ b/cpukit/score/include/rtems/score/thread.h
@@ -690,6 +690,9 @@ typedef struct {
*
* Uses a leading underscore in the structure name to allow forward
* declarations in standard header files provided by Newlib and GCC.
+ *
+ * In case the second member changes (currently Join_queue), then the memset()
+ * in _Thread_Initialize() must be adjusted.
*/
struct _Thread_Control {
/** This field is the object management structure for each thread. */
diff --git a/cpukit/score/src/threadinitialize.c b/cpukit/score/src/threadinitialize.c
index 5725c6eac8..60bbd22238 100644
--- a/cpukit/score/src/threadinitialize.c
+++ b/cpukit/score/src/threadinitialize.c
@@ -72,9 +72,9 @@ bool _Thread_Initialize(
#endif
memset(
- &the_thread->current_state,
+ &the_thread->Join_queue,
0,
- information->Objects.size - offsetof( Thread_Control, current_state )
+ information->Objects.size - offsetof( Thread_Control, Join_queue )
);
for ( i = 0 ; i < _Thread_Control_add_on_count ; ++i ) {