task_stack_fill_set. STMicroelectronics OS20
Advertisement
Advertisement
16.2 OS20 function descriptions 16 Alphabetical list of functions
task_stack_fill_set
Set task stack fill settings
Synopsis
#include <task.h> int task_stack_fill_set( task_stack_fill_t* fill );
Arguments task_stack_fill_t* fill Pointer to new settings
Results
Returns 0 on success, -1 if an error occurs.
Errors
Returns -1 if the new settings are invalid.
Description task_stack_fill_set() allows task stack fill settings to be changed by reading the new settings from the structure provided by the pointer fill . Task stack filling can be enabled, disabled or the fill pattern redefined.
Any subsequent calls to the functions task_init() or task_create() use these settings when initializing the stack.
By default, task stack filling is enabled with a fill pattern of 0x12345678. Any task that is created using task_init() or task_create() has its stack initialized by overwriting the whole contents of the stack with the value 0x12345678.
shows the layout of the task_stack_fill_t structure.
Field task_stack_fill_state task_stack_fill_pattern
Description
Enable or Disable stack filling (See
).
Pattern value used when a stack is initialized.
Table 58: Layout of structure task_stack_fill_t
shows all the flag values which can be used in the field t ask_stack_fill_state .
Any other value not in the table causes task_stack_fill_set() to return -1 .
Flag task_stack_fill_state_off task_stack_fill_state_on
Description
Disable task stack filling.
Enable task stack filling.
Table 59: Flags used by task_stack_fill_state
277
ADCS 7473749D
OS20 User Manual
Callable from
Tasks only
Example
#include <task.h> task_stack_fill_t options = {
task_stack_fill_state_on,
0x76543210
}; int result = task_stack_fill_set(&options);
See also
,
16.2 OS20 function descriptions
278
ADCS 7473749D
Download
Advertisement