summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/isrthreaddispatch.c
diff options
context:
space:
mode:
authorThomas Doerfler <Thomas.Doerfler@embedded-brains.de>2009-07-17 12:43:12 +0000
committerThomas Doerfler <Thomas.Doerfler@embedded-brains.de>2009-07-17 12:43:12 +0000
commit4da69ca0794f8b67ebf68fa96e1786e1d85e265b (patch)
tree1f15b7853027f6e8c7b8c55ea3e8b449772ed190 /cpukit/score/src/isrthreaddispatch.c
parentUpdate. (diff)
downloadrtems-4da69ca0794f8b67ebf68fa96e1786e1d85e265b.tar.bz2
add common implementation to dispatch threads in isr
Diffstat (limited to 'cpukit/score/src/isrthreaddispatch.c')
-rw-r--r--cpukit/score/src/isrthreaddispatch.c44
1 files changed, 44 insertions, 0 deletions
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
+ * <rtems@embedded-brains.de>
+ *
+ * Copyright (c) 2009 Till Straumann <strauman@slac.stanford.edu>
+ *
+ * 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 <rtems.h>
+#include <rtems/score/apiext.h>
+
+#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 */