From 884b460d64f49d6f42b9070f7ac5b979876e6cc7 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 12 Nov 1999 14:52:36 +0000 Subject: Added per-task variable data stucture (rtems_task_variable_t), task_variables field to API extension, and two directives (rtems_task_variable_add and rtems_task_variable_delete). --- c/src/exec/rtems/include/rtems/rtems/tasks.h | 40 +++++++++++++++++++++++++--- cpukit/rtems/include/rtems/rtems/tasks.h | 40 +++++++++++++++++++++++++--- 2 files changed, 72 insertions(+), 8 deletions(-) diff --git a/c/src/exec/rtems/include/rtems/rtems/tasks.h b/c/src/exec/rtems/include/rtems/rtems/tasks.h index f09f746a04..3627cdd627 100644 --- a/c/src/exec/rtems/include/rtems/rtems/tasks.h +++ b/c/src/exec/rtems/include/rtems/rtems/tasks.h @@ -146,6 +146,16 @@ typedef struct { unsigned32 argument; /* task argument */ } rtems_initialization_tasks_table; +/* + * Per task variable structure + */ + +struct rtems_task_variable_t { + struct rtems_task_variable_t *next; + int *ptr; + int var; +}; + /* * This is the API specific information required by each thread for * the RTEMS API to function correctly. @@ -153,10 +163,11 @@ typedef struct { typedef struct { - unsigned32 Notepads[ RTEMS_NUMBER_NOTEPADS ]; - rtems_event_set pending_events; - rtems_event_set event_condition; - ASR_Information Signal; + unsigned32 Notepads[ RTEMS_NUMBER_NOTEPADS ]; + rtems_event_set pending_events; + rtems_event_set event_condition; + ASR_Information Signal; + struct rtems_task_variable_t *task_variables; } RTEMS_API_Control; /* @@ -405,6 +416,27 @@ rtems_status_code rtems_task_is_suspended( Objects_Id id ); +/* + * rtems_task_variable_add + * + * This directive adds a per task variable. + */ + +rtems_status_code rtems_task_variable_add( + rtems_id tid, + int *ptr +); + +/* + * rtems_task_variable_delete + * + * This directive removes a per task variable. + */ + +rtems_status_code rtems_task_variable_delete( + rtems_id tid, + int *ptr +); /* * _RTEMS_tasks_Initialize_user_tasks diff --git a/cpukit/rtems/include/rtems/rtems/tasks.h b/cpukit/rtems/include/rtems/rtems/tasks.h index f09f746a04..3627cdd627 100644 --- a/cpukit/rtems/include/rtems/rtems/tasks.h +++ b/cpukit/rtems/include/rtems/rtems/tasks.h @@ -146,6 +146,16 @@ typedef struct { unsigned32 argument; /* task argument */ } rtems_initialization_tasks_table; +/* + * Per task variable structure + */ + +struct rtems_task_variable_t { + struct rtems_task_variable_t *next; + int *ptr; + int var; +}; + /* * This is the API specific information required by each thread for * the RTEMS API to function correctly. @@ -153,10 +163,11 @@ typedef struct { typedef struct { - unsigned32 Notepads[ RTEMS_NUMBER_NOTEPADS ]; - rtems_event_set pending_events; - rtems_event_set event_condition; - ASR_Information Signal; + unsigned32 Notepads[ RTEMS_NUMBER_NOTEPADS ]; + rtems_event_set pending_events; + rtems_event_set event_condition; + ASR_Information Signal; + struct rtems_task_variable_t *task_variables; } RTEMS_API_Control; /* @@ -405,6 +416,27 @@ rtems_status_code rtems_task_is_suspended( Objects_Id id ); +/* + * rtems_task_variable_add + * + * This directive adds a per task variable. + */ + +rtems_status_code rtems_task_variable_add( + rtems_id tid, + int *ptr +); + +/* + * rtems_task_variable_delete + * + * This directive removes a per task variable. + */ + +rtems_status_code rtems_task_variable_delete( + rtems_id tid, + int *ptr +); /* * _RTEMS_tasks_Initialize_user_tasks -- cgit v1.2.3