diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-11-28 13:28:32 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-11-28 16:08:43 +0100 |
commit | c09db57f37e02e8458e3bffce689774546845bef (patch) | |
tree | 7afe403fa39ff81cedf0c83df1a73b950a871c1f /cpukit/score/include/rtems/score/threadqimpl.h | |
parent | or1k: Avoid multiple iterations over cache (diff) | |
download | rtems-c09db57f37e02e8458e3bffce689774546845bef.tar.bz2 |
score: Fix thread queue context initialization
Initialize the thread queue context with invalid data in debug
configurations to catch missing set up steps.
Diffstat (limited to 'cpukit/score/include/rtems/score/threadqimpl.h')
-rw-r--r-- | cpukit/score/include/rtems/score/threadqimpl.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cpukit/score/include/rtems/score/threadqimpl.h b/cpukit/score/include/rtems/score/threadqimpl.h index bb35b1718b..760c83c658 100644 --- a/cpukit/score/include/rtems/score/threadqimpl.h +++ b/cpukit/score/include/rtems/score/threadqimpl.h @@ -87,9 +87,10 @@ RTEMS_INLINE_ROUTINE void _Thread_queue_Context_initialize( ) { #if defined(RTEMS_DEBUG) - memset( queue_context, 0, sizeof( *queue_context ) ); - queue_context->enqueue_callout = _Thread_queue_Enqueue_do_nothing; - queue_context->deadlock_callout = _Thread_queue_Deadlock_fatal; + memset( queue_context, 0x7f, sizeof( *queue_context ) ); +#if defined(RTEMS_SMP) + _Chain_Initialize_node( &queue_context->Lock_context.Wait.Gate.Node ); +#endif #else (void) queue_context; #endif |