Ignore:
Timestamp:
10/04/05 21:53:58 (17 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Children:
24b6d2f
Parents:
dc4bd19
Message:

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

PR 829/rtems

  • src/tasks.c, 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.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/rtems/src/taskvariabledelete.c

    rdc4bd19 ra3b4632  
    5757        if (prev) prev->next = tvp->next;
    5858        else      the_thread->task_variables = tvp->next;
    59         if (tvp->dtor)
    60           (*tvp->dtor)(*tvp->ptr);
    61         if (_Thread_Is_executing(the_thread))
     59        if (_Thread_Is_executing(the_thread)) {
     60          if (tvp->dtor)
     61            (*tvp->dtor)(*tvp->ptr);
    6262          *tvp->ptr = tvp->gval;
     63        } else {
     64          if (tvp->dtor)
     65            (*tvp->dtor)(tvp->tval);
     66        }
    6367        _Workspace_Free(tvp);
    6468        _Thread_Enable_dispatch();
Note: See TracChangeset for help on using the changeset viewer.