Changeset 98dee44b in rtems


Ignore:
Timestamp:
Dec 12, 2007, 11:19:57 PM (13 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.9, 5, master
Children:
16e0ba0f
Parents:
f446e6d
Message:

2007-12-12 Joel Sherrill <joel.sherrill@…>

  • rtems/Makefile.am, rtems/include/rtems/rtems/tasks.h, rtems/src/tasks.c, rtems/src/taskvariableadd.c, rtems/src/taskvariabledelete.c: Add test code for task variables to improve coverage.
  • rtems/src/taskvariable_invoke_dtor.c: New file.
Location:
cpukit
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    rf446e6d r98dee44b  
     12007-12-12      Joel Sherrill <joel.sherrill@OARcorp.com>
     2
     3        * rtems/Makefile.am, rtems/include/rtems/rtems/tasks.h,
     4        rtems/src/tasks.c, rtems/src/taskvariableadd.c,
     5        rtems/src/taskvariabledelete.c: Add test code for task variables to
     6        improve coverage.
     7        * rtems/src/taskvariable_invoke_dtor.c: New file.
     8
    192007-12-12      Joel Sherrill <joel.sherrill@oarcorp.com>
    210
  • cpukit/rtems/Makefile.am

    rf446e6d r98dee44b  
    88AM_CPPFLAGS += -D__RTEMS_INSIDE__
    99
     10project_lib_LIBRARIES = librtems.a
    1011noinst_LIBRARIES = librtems.a
    1112librtems_a_CPPFLAGS = $(AM_CPPFLAGS)
     
    6263    src/tasksuspend.c src/taskwakeafter.c src/taskwakewhen.c \
    6364    src/taskvariableadd.c src/taskvariabledelete.c src/taskvariableget.c \
    64     src/taskdata.c
     65    src/taskvariable_invoke_dtor.c src/taskdata.c
    6566
    6667## RATEMON_C_FILES
  • cpukit/rtems/include/rtems/rtems/tasks.h

    rf446e6d r98dee44b  
    2424 *     + wake up when specified
    2525 *
    26  *  COPYRIGHT (c) 1989-1999.
     26 *  COPYRIGHT (c) 1989-2007.
    2727 *  On-Line Applications Research Corporation (OAR).
    2828 *
     
    450450void _RTEMS_tasks_Initialize_user_tasks( void );
    451451
     452/*
     453 *  _RTEMS_Tasks_Invoke_task_variable_dtor(
     454 *
     455 *  This routine invokes the optional user provided destructor on the
     456 *  task variable and frees the memory for the task variable.
     457 *
     458 *  Input parameters: NONE
     459 *
     460 *  Output parameters:  NONE
     461 */
     462
     463void _RTEMS_Tasks_Invoke_task_variable_dtor(
     464  Thread_Control        *the_thread,
     465  rtems_task_variable_t *tvp
     466);
     467
    452468#ifndef __RTEMS_APPLICATION__
    453469#include <rtems/rtems/tasks.inl>
  • cpukit/rtems/src/tasks.c

    rf446e6d r98dee44b  
    112112  while (tvp) {
    113113    next = (rtems_task_variable_t *)tvp->next;
    114     if (_Thread_Is_executing(deleted)) {
    115       if  (tvp->dtor)
    116         (*tvp->dtor)(*tvp->ptr);
    117       *tvp->ptr = tvp->gval;
    118     } else {
    119       if  (tvp->dtor)
    120         (*tvp->dtor)(tvp->tval);
    121     }
    122     _Workspace_Free( tvp );
     114    _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp );
    123115    tvp = next;
    124116  }
  • cpukit/rtems/src/taskvariableadd.c

    rf446e6d r98dee44b  
    5050      while (tvp) {
    5151        if (tvp->ptr == ptr) {
    52           tvp->dtor = dtor;
     52          tvp->dtor = dtor;
    5353          _Thread_Enable_dispatch();
    5454          return RTEMS_SUCCESSFUL;
  • cpukit/rtems/src/taskvariabledelete.c

    rf446e6d r98dee44b  
    5252          else     
    5353            the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
    54           if (_Thread_Is_executing(the_thread)) {
    55             if (tvp->dtor)
    56               (*tvp->dtor)(*tvp->ptr);
    57             *tvp->ptr = tvp->gval;
    58           } else {
    59             if (tvp->dtor)
    60               (*tvp->dtor)(tvp->tval);
    61           }
    62           _Workspace_Free(tvp);
     54
     55          _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
    6356          _Thread_Enable_dispatch();
    6457          return RTEMS_SUCCESSFUL;
Note: See TracChangeset for help on using the changeset viewer.