forked from Imagelibrary/rtems
rtems: Relax mode checks in rtems_signal_catch()
Check only for invalid modes if a valid handler is presented to rtems_signal_catch(). When NULL is used for the handler, ASR processing is disabled and the mode is not used. Update #4244.
This commit is contained in:
@@ -39,7 +39,10 @@ rtems_status_code rtems_signal_catch(
|
||||
ISR_lock_Context lock_context;
|
||||
|
||||
#if defined(RTEMS_SMP) || CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE
|
||||
if ( !_Modes_Is_interrupt_level_supported( mode_set ) ) {
|
||||
if (
|
||||
asr_handler != NULL &&
|
||||
!_Modes_Is_interrupt_level_supported( mode_set )
|
||||
) {
|
||||
return RTEMS_NOT_IMPLEMENTED;
|
||||
}
|
||||
#endif
|
||||
@@ -47,7 +50,10 @@ rtems_status_code rtems_signal_catch(
|
||||
executing = _Thread_State_acquire_for_executing( &lock_context );
|
||||
|
||||
#if defined(RTEMS_SMP)
|
||||
if ( !_Modes_Is_preempt_mode_supported( mode_set, executing ) ) {
|
||||
if (
|
||||
asr_handler != NULL &&
|
||||
!_Modes_Is_preempt_mode_supported( mode_set, executing )
|
||||
) {
|
||||
_Thread_State_release( executing, &lock_context );
|
||||
return RTEMS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user