score: Fix _Thread_Initialize()

This commit is contained in:
Sebastian Huber
2017-01-31 09:37:54 +01:00
parent 166a9f67cd
commit 70488f5655
2 changed files with 5 additions and 2 deletions

View File

@@ -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. */

View File

@@ -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 ) {