From 8778a0e1188ee00932ce47d410de54c4e053f3bf Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 16 Feb 2021 10:27:03 +0100 Subject: rtems: New errors for rtems_signal_catch() Ensure that no invalid modes are set during ASR processing. Update #4244. --- cpukit/rtems/src/taskmode.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'cpukit/rtems/src/taskmode.c') diff --git a/cpukit/rtems/src/taskmode.c b/cpukit/rtems/src/taskmode.c index e1748bc7bd..6ca4e99fc6 100644 --- a/cpukit/rtems/src/taskmode.c +++ b/cpukit/rtems/src/taskmode.c @@ -50,11 +50,8 @@ rtems_status_code rtems_task_mode( #if defined(RTEMS_SMP) if ( - ( mask & RTEMS_PREEMPT_MASK ) != 0 - && !_Modes_Is_preempt( mode_set ) - && !_Scheduler_Is_non_preempt_mode_supported( - _Thread_Scheduler_get_home( executing ) - ) + ( mask & RTEMS_PREEMPT_MASK ) != 0 && + !_Modes_Is_preempt_mode_supported( mode_set, executing ) ) { return RTEMS_NOT_IMPLEMENTED; } @@ -62,11 +59,8 @@ rtems_status_code rtems_task_mode( #if defined(RTEMS_SMP) || CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE if ( - ( mask & RTEMS_INTERRUPT_MASK ) != 0 - && _Modes_Get_interrupt_level( mode_set ) != 0 -#if CPU_ENABLE_ROBUST_THREAD_DISPATCH == FALSE - && _SMP_Need_inter_processor_interrupts() -#endif + ( mask & RTEMS_INTERRUPT_MASK ) != 0 && + !_Modes_Is_interrupt_level_supported( mode_set ) ) { return RTEMS_NOT_IMPLEMENTED; } -- cgit v1.2.3