mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-28 05:02:23 +08:00
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).
This commit is contained in:
@@ -146,6 +146,16 @@ typedef struct {
|
|||||||
unsigned32 argument; /* task argument */
|
unsigned32 argument; /* task argument */
|
||||||
} rtems_initialization_tasks_table;
|
} 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
|
* This is the API specific information required by each thread for
|
||||||
* the RTEMS API to function correctly.
|
* the RTEMS API to function correctly.
|
||||||
@@ -153,10 +163,11 @@ typedef struct {
|
|||||||
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
unsigned32 Notepads[ RTEMS_NUMBER_NOTEPADS ];
|
unsigned32 Notepads[ RTEMS_NUMBER_NOTEPADS ];
|
||||||
rtems_event_set pending_events;
|
rtems_event_set pending_events;
|
||||||
rtems_event_set event_condition;
|
rtems_event_set event_condition;
|
||||||
ASR_Information Signal;
|
ASR_Information Signal;
|
||||||
|
struct rtems_task_variable_t *task_variables;
|
||||||
} RTEMS_API_Control;
|
} RTEMS_API_Control;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -405,6 +416,27 @@ rtems_status_code rtems_task_is_suspended(
|
|||||||
Objects_Id id
|
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
|
* _RTEMS_tasks_Initialize_user_tasks
|
||||||
|
|||||||
@@ -146,6 +146,16 @@ typedef struct {
|
|||||||
unsigned32 argument; /* task argument */
|
unsigned32 argument; /* task argument */
|
||||||
} rtems_initialization_tasks_table;
|
} 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
|
* This is the API specific information required by each thread for
|
||||||
* the RTEMS API to function correctly.
|
* the RTEMS API to function correctly.
|
||||||
@@ -153,10 +163,11 @@ typedef struct {
|
|||||||
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
unsigned32 Notepads[ RTEMS_NUMBER_NOTEPADS ];
|
unsigned32 Notepads[ RTEMS_NUMBER_NOTEPADS ];
|
||||||
rtems_event_set pending_events;
|
rtems_event_set pending_events;
|
||||||
rtems_event_set event_condition;
|
rtems_event_set event_condition;
|
||||||
ASR_Information Signal;
|
ASR_Information Signal;
|
||||||
|
struct rtems_task_variable_t *task_variables;
|
||||||
} RTEMS_API_Control;
|
} RTEMS_API_Control;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -405,6 +416,27 @@ rtems_status_code rtems_task_is_suspended(
|
|||||||
Objects_Id id
|
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
|
* _RTEMS_tasks_Initialize_user_tasks
|
||||||
|
|||||||
Reference in New Issue
Block a user