RCS file: cpukit/score/src/isrthreaddispatch.c
diff -N cpukit/score/src/isrthreaddispatch.c
-
|
+
|
|
| 1 | /** |
| 2 | * @file |
| 3 | * |
| 4 | * @brief Thread dispatch from interrupt context. |
| 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 | void _ISR_Thread_dispatch( void ) |
| 27 | { |
| 28 | if (_Context_Switch_necessary) { |
| 29 | _Thread_Dispatch(); |
| 30 | } else if (_ISR_Signals_to_thread_executing) { |
| 31 | _ISR_Signals_to_thread_executing = false; |
| 32 | if ( |
| 33 | _Thread_Do_post_task_switch_extension |
| 34 | || _Thread_Executing->do_post_task_switch_extension |
| 35 | ) { |
| 36 | _Thread_Executing->do_post_task_switch_extension = false; |
| 37 | _API_extensions_Run_postswitch(); |
| 38 | } |
| 39 | } |
| 40 | } |
RCS file: /usr1/CVS/rtems/cpukit/score/include/rtems/score/isr.h,v
retrieving revision 1.29
diff -u -r1.29 isr.h
|
|
|
196 | 196 | void _ISR_Dispatch( void ); |
197 | 197 | |
198 | 198 | /** |
| 199 | * Invokes the thread dispatcher or signal handler if necessary. |
| 200 | * |
| 201 | * It should be called at the end of interrupt processing. The thread |
| 202 | * dispatch disable level and the interrupt nest level must be zero before |
| 203 | * calling this routine. |
| 204 | * |
| 205 | * This is a high level replacement of _ISR_Dispatch(). It must be invoked |
| 206 | * within an environment such that a call to _Thread_Dispatch() is allowed. |
| 207 | */ |
| 208 | void _ISR_Thread_dispatch( void ); |
| 209 | |
| 210 | /** |
199 | 211 | * This function returns true if the processor is currently servicing |
200 | 212 | * and interrupt and false otherwise. A return value of true indicates |
201 | 213 | * that the caller is an interrupt service routine, NOT a thread. The |