Support rtems_ada_self iff __RTEMS_ADA__ is given.

This commit is contained in:
Ralf Corsepius
2008-07-02 15:28:54 +00:00
parent 9a9851dd4a
commit 81b329a94f
3 changed files with 6 additions and 0 deletions

View File

@@ -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.

View File

@@ -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 );

View File

@@ -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.