summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2008-07-02 15:28:54 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2008-07-02 15:28:54 +0000
commit81b329a94f1bc2bcd0c3fb3e93f4d74c37fddcec (patch)
treec071a8bca37c64e6e95f59b30203a63d1a22897c
parent2008-07-02 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-81b329a94f1bc2bcd0c3fb3e93f4d74c37fddcec.tar.bz2
Support rtems_ada_self iff __RTEMS_ADA__ is given.
-rw-r--r--cpukit/score/include/rtems/score/thread.h2
-rw-r--r--cpukit/score/src/threaddispatch.c2
-rw-r--r--cpukit/score/src/threadinitialize.c2
3 files changed, 6 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/thread.h b/cpukit/score/include/rtems/score/thread.h
index 3952d183c8..6f707ce652 100644
--- a/cpukit/score/include/rtems/score/thread.h
+++ b/cpukit/score/include/rtems/score/thread.h
@@ -331,8 +331,10 @@ struct Thread_Control_struct {
boolean do_post_task_switch_extension;
/** This field is true if the thread is preemptible. */
boolean is_preemptible;
+#if __RTEMS_ADA__
/** This field is the GNAT self context pointer. */
void *rtems_ada_self;
+#endif
/** This field is the length of the time quantum that this thread is
* allowed to consume. The algorithm used to manage limits on CPU usage
* is specified by budget_algorithm.
diff --git a/cpukit/score/src/threaddispatch.c b/cpukit/score/src/threaddispatch.c
index 50bac5f4aa..b98ae2a6bc 100644
--- a/cpukit/score/src/threaddispatch.c
+++ b/cpukit/score/src/threaddispatch.c
@@ -93,8 +93,10 @@ void _Thread_Dispatch( void )
_Thread_Dispatch_disable_level = 1;
_Context_Switch_necessary = FALSE;
_Thread_Executing = heir;
+#if __RTEMS_ADA__
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
+#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
_ISR_Enable( level );
diff --git a/cpukit/score/src/threadinitialize.c b/cpukit/score/src/threadinitialize.c
index 267d8f60cc..f0c9079630 100644
--- a/cpukit/score/src/threadinitialize.c
+++ b/cpukit/score/src/threadinitialize.c
@@ -63,11 +63,13 @@ boolean _Thread_Initialize(
void *extensions_area;
boolean extension_status;
+#if __RTEMS_ADA__
/*
* Initialize the Ada self pointer
*/
the_thread->rtems_ada_self = NULL;
+#endif
/*
* Allocate and Initialize the stack for this thread.