mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-20 21:56:06 +08:00
A bit more explanation for task variables per Eric Norum <eric@cls.usask.ca>.
This commit is contained in:
@@ -301,6 +301,13 @@ other tasks' modifications to that variable will not affect the value
|
||||
seen by the task. This is accomplished by saving and restoring the
|
||||
variable's value each time a task switch occurs to or from the calling task.
|
||||
|
||||
The value seen by other tasks, including those which have not added the
|
||||
variable to their set and are thus accessing the variable as a common
|
||||
location shared among tasks, can not be affected by a task once it has
|
||||
added a variable to its local set. Changes made to the variable by
|
||||
other tasks will not affect the value seen by a task which has added the
|
||||
variable to its private set.
|
||||
|
||||
This feature can be used when a routine is to be spawned repeatedly as
|
||||
several independent tasks. Although each task will have its own stack,
|
||||
and thus separate stack variables, they will all share the same static and
|
||||
|
||||
Reference in New Issue
Block a user