From dfcc8bb2a6a0c9983a22268a933ef1f21a07eaaa Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 3 May 2016 07:43:54 +0200 Subject: score: Adjust thread queue layout Adjust thread queue layout according to Newlib. This makes it possible to use the same implementation for and CORE mutexes in the future. --- cpukit/score/include/rtems/score/threadqimpl.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'cpukit/score/include/rtems/score/threadqimpl.h') diff --git a/cpukit/score/include/rtems/score/threadqimpl.h b/cpukit/score/include/rtems/score/threadqimpl.h index 7489d5466b..a8f404f299 100644 --- a/cpukit/score/include/rtems/score/threadqimpl.h +++ b/cpukit/score/include/rtems/score/threadqimpl.h @@ -40,8 +40,6 @@ extern "C" { * defined in Newlib . */ typedef struct { - Thread_queue_Queue Queue; - #if !defined(RTEMS_SMP) /* * The struct _Thread_queue_Queue definition is independent of the RTEMS @@ -51,6 +49,8 @@ typedef struct { */ unsigned int reserved[2]; #endif + + Thread_queue_Queue Queue; } Thread_queue_Syslock_queue; RTEMS_INLINE_ROUTINE void _Thread_queue_Do_context_initialize( @@ -115,10 +115,11 @@ RTEMS_INLINE_ROUTINE void _Thread_queue_Queue_initialize( Thread_queue_Queue *queue ) { - queue->heads = NULL; #if defined(RTEMS_SMP) _SMP_ticket_lock_Initialize( &queue->Lock ); #endif + queue->heads = NULL; + queue->owner = NULL; } RTEMS_INLINE_ROUTINE void _Thread_queue_Queue_do_acquire_critical( -- cgit v1.2.3