diff --git a/cpukit/score/src/isrthreaddispatch.c b/cpukit/score/src/isrthreaddispatch.c new file mode 100644 index 0000000000..3fd33409f2 --- /dev/null +++ b/cpukit/score/src/isrthreaddispatch.c @@ -0,0 +1,44 @@ +/** + * @file + * + * @brief Thread dispatch after interrupt processing. + */ + +/* + * Copyright (c) 2009 embedded brains GmbH + * + * embedded brains GmbH + * Obere Lagerstr. 30 + * D-82178 Puchheim + * Germany + * + * + * Copyright (c) 2009 Till Straumann + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.com/license/LICENSE. + */ + +#include +#include + +#if ( CPU_ENABLE_C_ISR_DISPATCH_IMPLEMENTATION == TRUE ) + +void _ISR_Thread_dispatch( void ) +{ + if ( _Context_Switch_necessary ) { + _Thread_Dispatch(); + } else if ( _ISR_Signals_to_thread_executing ) { + _ISR_Signals_to_thread_executing = false; + if ( + _Thread_Do_post_task_switch_extension + || _Thread_Executing->do_post_task_switch_extension + ) { + _Thread_Executing->do_post_task_switch_extension = false; + _API_extensions_Run_postswitch(); + } + } +} + +#endif /* CPU_ENABLE_C_ISR_DISPATCH_IMPLEMENTATION */