summaryrefslogtreecommitdiffstats
path: root/c/src/exec/rtems/src/taskvariableadd.c
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/exec/rtems/src/taskvariableadd.c')
-rw-r--r--c/src/exec/rtems/src/taskvariableadd.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/c/src/exec/rtems/src/taskvariableadd.c b/c/src/exec/rtems/src/taskvariableadd.c
index 1bc38bdf46..8928f6d7d7 100644
--- a/c/src/exec/rtems/src/taskvariableadd.c
+++ b/c/src/exec/rtems/src/taskvariableadd.c
@@ -30,7 +30,6 @@ rtems_status_code rtems_task_variable_add(
{
Thread_Control *the_thread;
Objects_Locations location;
- RTEMS_API_Control *api;
rtems_task_variable_t *tvp, *new;
the_thread = _Thread_Get (tid, &location);
@@ -48,13 +47,12 @@ rtems_status_code rtems_task_variable_add(
return RTEMS_INTERNAL_ERROR;
case OBJECTS_LOCAL:
- api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
/*
* Figure out if the variable is already in this task's list.
*/
- tvp = api->task_variables;
+ tvp = the_thread->task_variables;
while (tvp) {
if (tvp->ptr == ptr) {
_Thread_Enable_dispatch();
@@ -76,8 +74,8 @@ rtems_status_code rtems_task_variable_add(
new->var = 0;
new->ptr = ptr;
- new->next = api->task_variables;
- api->task_variables = new;
+ new->next = the_thread->task_variables;
+ the_thread->task_variables = new;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}