Changeset a93a239 in rtems


Ignore:
Timestamp:
Oct 4, 2005, 9:55:24 PM (15 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
da6ce58f
Parents:
1a561f8
Message:

2005-10-04 Till Straumann <strauman@…>

PR 829/rtems

  • rtems/src/tasks.c, rtems/src/taskvariabledelete.c: If task variables are deleted from a different context (i.e., executing context != owner of the task variable. The owner meaning the task that registered the dtor in question) the argument passed to the task variable dtor must be tvar and not *ptr which yields the executing task's value of the task variable instead of the owner's.
Location:
cpukit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    r1a561f8 ra93a239  
     12005-10-04      Till Straumann <strauman@slac.stanford.edu>
     2
     3        PR 829/rtems
     4        * rtems/src/tasks.c, rtems/src/taskvariabledelete.c: If task variables
     5        are deleted from a different context (i.e., executing context !=
     6        owner of the task variable. The owner meaning the task that
     7        registered the dtor in question) the argument passed to the task
     8        variable dtor must be tvar and not *ptr which yields the executing
     9        task's value of the task variable instead of the owner's.
     10
    1112005-09-29      Eric Norum <norume@aps.anl.gov>
    212
  • cpukit/rtems/src/tasks.c

    r1a561f8 ra93a239  
    113113  while (tvp) {
    114114    next = tvp->next;
    115     if  (tvp->dtor)
     115    if (_Thread_Is_executing(deleted)) {
     116      if  (tvp->dtor)
    116117        (*tvp->dtor)(*tvp->ptr);
    117     if (_Thread_Is_executing(deleted))
    118         *tvp->ptr = tvp->gval;
     118      *tvp->ptr = tvp->gval;
     119    } else {
     120      if  (tvp->dtor)
     121        (*tvp->dtor)(tvp->tval);
     122    }
    119123    _Workspace_Free( tvp );
    120124    tvp = next;
  • cpukit/rtems/src/taskvariabledelete.c

    r1a561f8 ra93a239  
    6161        if (prev) prev->next = tvp->next;
    6262        else      the_thread->task_variables = tvp->next;
    63         if (tvp->dtor)
    64           (*tvp->dtor)(*tvp->ptr);
    65         if (_Thread_Is_executing(the_thread))
     63        if (_Thread_Is_executing(the_thread)) {
     64          if (tvp->dtor)
     65            (*tvp->dtor)(*tvp->ptr);
    6666          *tvp->ptr = tvp->gval;
     67        } else {
     68          if (tvp->dtor)
     69            (*tvp->dtor)(tvp->tval);
     70        }
    6771        _Workspace_Free(tvp);
    6872        _Thread_Enable_dispatch();
Note: See TracChangeset for help on using the changeset viewer.