summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2000-01-21 15:07:55 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2000-01-21 15:07:55 +0000
commitc941a980ccbd8def1d925fc5c69a22f40e1e5060 (patch)
tree4b2b9ae1c94411a26ed2c5c1fa747a3fd296a4ae /cpukit/score/include
parente570c7617d8c1032bf4c1c3cd0df2a7683ee80bf (diff)
downloadrtems-c941a980ccbd8def1d925fc5c69a22f40e1e5060.tar.bz2
Patch from Eric Norum <eric@cls.usask.ca> to implement this:
I'd like to propose a change to RTEMS task variables that I think would make them more useful. I think that it is early enough in their existence to still make changes to their API. 1) Change type from `int' to `void *'. 2) Add extra argument to task_variable_add -- if non-NULL, a pointer to a `destructor' function to be called when the task exits. This function would be called with that task's value of the task variable as its argument. In many cases, the `dtor' function could be `free'. rtems_status_code rtems_task_variable_add ( rtems_id tid, void **ptr, void (*dtor)(void *)); rtems_status_code rtems_task_variable_delete (rtems_id tid, void **ptr); This would be all we'd need to cleanly and efficiently support C++ per-thread exception information without dragging in all that POSIX API stuff.
Diffstat (limited to 'cpukit/score/include')
-rw-r--r--cpukit/score/include/rtems/score/thread.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/cpukit/score/include/rtems/score/thread.h b/cpukit/score/include/rtems/score/thread.h
index 0e2802bbac..ec48864a9f 100644
--- a/cpukit/score/include/rtems/score/thread.h
+++ b/cpukit/score/include/rtems/score/thread.h
@@ -93,8 +93,9 @@ struct rtems_task_variable_tt;
struct rtems_task_variable_tt {
struct rtems_task_variable_tt *next;
- int *ptr;
- int var;
+ void **ptr;
+ void *var;
+ void (*dtor)(void *);
};
typedef struct rtems_task_variable_tt rtems_task_variable_t;