diff options
Diffstat (limited to 'c/src/exec/score')
-rw-r--r-- | c/src/exec/score/headers/thread.h | 7 | ||||
-rw-r--r-- | c/src/exec/score/include/rtems/score/thread.h | 7 | ||||
-rw-r--r-- | c/src/exec/score/src/thread.c | 8 |
3 files changed, 22 insertions, 0 deletions
diff --git a/c/src/exec/score/headers/thread.h b/c/src/exec/score/headers/thread.h index da6fa76bd0..7fc3361c39 100644 --- a/c/src/exec/score/headers/thread.h +++ b/c/src/exec/score/headers/thread.h @@ -177,6 +177,7 @@ struct Thread_Control_struct { boolean do_post_task_switch_extension; boolean is_preemptible; + void *rtems_ada_self; unsigned32 cpu_time_budget; Thread_CPU_budget_algorithms budget_algorithm; Thread_CPU_budget_algorithm_callout budget_callout; @@ -192,6 +193,12 @@ struct Thread_Control_struct { }; /* + * Self for the GNU Ada Run-Time + */ + +SCORE_EXTERN void *rtems_ada_self; + +/* * The following defines the information control block used to * manage this class of objects. */ diff --git a/c/src/exec/score/include/rtems/score/thread.h b/c/src/exec/score/include/rtems/score/thread.h index da6fa76bd0..7fc3361c39 100644 --- a/c/src/exec/score/include/rtems/score/thread.h +++ b/c/src/exec/score/include/rtems/score/thread.h @@ -177,6 +177,7 @@ struct Thread_Control_struct { boolean do_post_task_switch_extension; boolean is_preemptible; + void *rtems_ada_self; unsigned32 cpu_time_budget; Thread_CPU_budget_algorithms budget_algorithm; Thread_CPU_budget_algorithm_callout budget_callout; @@ -192,6 +193,12 @@ struct Thread_Control_struct { }; /* + * Self for the GNU Ada Run-Time + */ + +SCORE_EXTERN void *rtems_ada_self; + +/* * The following defines the information control block used to * manage this class of objects. */ diff --git a/c/src/exec/score/src/thread.c b/c/src/exec/score/src/thread.c index 4e44ac6f75..292e042d57 100644 --- a/c/src/exec/score/src/thread.c +++ b/c/src/exec/score/src/thread.c @@ -271,6 +271,8 @@ void _Thread_Dispatch( void ) _Thread_Dispatch_disable_level = 1; _Context_Switch_necessary = FALSE; _Thread_Executing = heir; + executing->rtems_ada_self = rtems_ada_self; + rtems_ada_self = heir->rtems_ada_self; _ISR_Enable( level ); heir->ticks_executed++; @@ -438,6 +440,12 @@ boolean _Thread_Initialize( void *extensions_area; /* + * Initialize the Ada self pointer + */ + + the_thread->rtems_ada_self = NULL; + + /* * Allocate and Initialize the stack for this thread. */ |