summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/src/taskvariableadd.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-11-16 22:56:38 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-11-16 22:56:38 +0000
commitaad726ebd45d0b25d62056639b0654fb74b1092e (patch)
tree5d2e1fb9a183ef0cad166dbe0c817de657e0105f /cpukit/rtems/src/taskvariableadd.c
parentAdded proper nesting level for dispatch disable check. (diff)
downloadrtems-aad726ebd45d0b25d62056639b0654fb74b1092e.tar.bz2
Moved task_variable pointer to basic shared part of TCB instead of
RTEMS API extension to avoid problems when the extension is freed. Eventually the task variable switch extension should become part of the core context switch and the Ada tcb self implemented in terms of it.
Diffstat (limited to 'cpukit/rtems/src/taskvariableadd.c')
-rw-r--r--cpukit/rtems/src/taskvariableadd.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/cpukit/rtems/src/taskvariableadd.c b/cpukit/rtems/src/taskvariableadd.c
index 1bc38bdf46..8928f6d7d7 100644
--- a/cpukit/rtems/src/taskvariableadd.c
+++ b/cpukit/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;
}