source: rtems/cpukit/score/src/isrthreaddispatch.c @ da42259

4.104.115
Last change on this file since da42259 was 4da69ca, checked in by Thomas Doerfler <Thomas.Doerfler@…>, on 07/17/09 at 12:43:12

add common implementation to dispatch threads in isr

  • Property mode set to 100644
File size: 1.0 KB
Line 
1/**
2 * @file
3 *
4 * @brief Thread dispatch after interrupt processing.
5 */
6
7/*
8 * Copyright (c) 2009 embedded brains GmbH
9 *
10 * embedded brains GmbH
11 * Obere Lagerstr. 30
12 * D-82178 Puchheim
13 * Germany
14 * <rtems@embedded-brains.de>
15 *
16 * Copyright (c) 2009 Till Straumann <strauman@slac.stanford.edu>
17 *
18 * The license and distribution terms for this file may be
19 * found in the file LICENSE in this distribution or at
20 * http://www.rtems.com/license/LICENSE.
21 */
22
23#include <rtems.h>
24#include <rtems/score/apiext.h>
25
26#if ( CPU_ENABLE_C_ISR_DISPATCH_IMPLEMENTATION == TRUE )
27
28void _ISR_Thread_dispatch( void )
29{
30  if ( _Context_Switch_necessary ) {
31    _Thread_Dispatch();
32  } else if ( _ISR_Signals_to_thread_executing ) {
33    _ISR_Signals_to_thread_executing = false;
34    if (
35      _Thread_Do_post_task_switch_extension
36        || _Thread_Executing->do_post_task_switch_extension
37    ) {
38      _Thread_Executing->do_post_task_switch_extension = false;
39      _API_extensions_Run_postswitch();
40    }
41  }
42}
43
44#endif /* CPU_ENABLE_C_ISR_DISPATCH_IMPLEMENTATION */
Note: See TracBrowser for help on using the repository browser.