From ccc92b81c9fa4a969bdcc92cf19667be105740c3 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 21 Nov 2016 10:26:32 +0100 Subject: score: Group Per_CPU_Control members by alignment Close #2820. --- cpukit/score/include/rtems/score/percpu.h | 38 +++++++++++++++---------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'cpukit/score/include/rtems/score/percpu.h') diff --git a/cpukit/score/include/rtems/score/percpu.h b/cpukit/score/include/rtems/score/percpu.h index 39190e9ef9..78196e8a2d 100644 --- a/cpukit/score/include/rtems/score/percpu.h +++ b/cpukit/score/include/rtems/score/percpu.h @@ -319,6 +319,21 @@ typedef struct Per_CPU_Control { */ volatile uint32_t thread_dispatch_disable_level; + /** + * @brief This is set to true when this processor needs to run the thread + * dispatcher. + * + * It is volatile since interrupts may alter this flag. + * + * This field is not protected by a lock and must be accessed only by this + * processor. Code (e.g. scheduler and post-switch action requests) running + * on another processors must use an inter-processor interrupt to set the + * thread dispatch necessary indicator to true. + * + * @see _Thread_Get_heir_and_make_it_executing(). + */ + volatile bool dispatch_necessary; + /** * @brief This is the thread executing on this processor. * @@ -347,21 +362,6 @@ typedef struct Per_CPU_Control { */ struct _Thread_Control *heir; - /** - * @brief This is set to true when this processor needs to run the thread - * dispatcher. - * - * It is volatile since interrupts may alter this flag. - * - * This field is not protected by a lock and must be accessed only by this - * processor. Code (e.g. scheduler and post-switch action requests) running - * on another processors must use an inter-processor interrupt to set the - * thread dispatch necessary indicator to true. - * - * @see _Thread_Get_heir_and_make_it_executing(). - */ - volatile bool dispatch_necessary; - #if defined(RTEMS_SMP) CPU_Interrupt_frame Interrupt_frame; #endif @@ -812,15 +812,15 @@ RTEMS_INLINE_ROUTINE struct _Thread_Control *_Thread_Get_executing( void ) PER_CPU_ISR_NEST_LEVEL + 4 #define PER_CPU_THREAD_DISPATCH_DISABLE_LEVEL \ PER_CPU_ISR_DISPATCH_DISABLE + 4 -#define PER_CPU_OFFSET_EXECUTING \ +#define PER_CPU_DISPATCH_NEEDED \ PER_CPU_THREAD_DISPATCH_DISABLE_LEVEL + 4 +#define PER_CPU_OFFSET_EXECUTING \ + PER_CPU_DISPATCH_NEEDED + 4 #define PER_CPU_OFFSET_HEIR \ PER_CPU_OFFSET_EXECUTING + CPU_SIZEOF_POINTER -#define PER_CPU_DISPATCH_NEEDED \ - PER_CPU_OFFSET_HEIR + CPU_SIZEOF_POINTER #if defined(RTEMS_SMP) #define PER_CPU_INTERRUPT_FRAME_AREA \ - PER_CPU_DISPATCH_NEEDED + 4 + PER_CPU_OFFSET_HEIR + CPU_SIZEOF_POINTER #endif #define THREAD_DISPATCH_DISABLE_LEVEL \ -- cgit v1.2.3