From ddd6f3d962dd96c1ac62d06d8aef05af5d60c674 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 2 Mar 2026 03:10:43 +0100 Subject: [PATCH] score: Do not use deprecated volatile operation C++20 deprecated some volatile operations including increments. Fix #5505. Signed-off-by: Sebastian Huber --- cpukit/include/rtems/score/threaddispatch.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cpukit/include/rtems/score/threaddispatch.h b/cpukit/include/rtems/score/threaddispatch.h index 6b1ca8e324..8c0844b19c 100644 --- a/cpukit/include/rtems/score/threaddispatch.h +++ b/cpukit/include/rtems/score/threaddispatch.h @@ -254,8 +254,11 @@ void _Thread_Dispatch_enable( Per_CPU_Control *cpu_self ); */ static inline void _Thread_Dispatch_unnest( Per_CPU_Control *cpu_self ) { - _Assert( cpu_self->thread_dispatch_disable_level > 0 ); - --cpu_self->thread_dispatch_disable_level; + uint32_t disable_level; + + disable_level = cpu_self->thread_dispatch_disable_level; + _Assert( disable_level > 0 ); + cpu_self->thread_dispatch_disable_level = disable_level + 1; } /**