RTOS Task Local Variables

Status
Not open for further replies.

vijay s

Full Member level 3
Joined
Jun 14, 2008
Messages
159
Helped
27
Reputation
54
Reaction score
9
Trophy points
1,298
Location
Coimbatore, India
Activity points
2,152
Hi Folks

Need little Clarification in Task Local Variables.. i know each Task has its own Stack, used to store context during task switch. what about its local variables, will that be allocated in System Task or in its own stack.

if allocated in local stack, can you folks explain in detail how its managed by Task....
 

The variables of a task and its reentrant routines when interrupted are pushed on the global stack, thereby creating private data for task and its reentrant routines. Nonreentrant code must by synchronized by some method such as a semaphore.

BigDog
 

Each task that is created will consume memory and this usually has to be defined when the task is created. The task’s stack is used to store all of its local variables, function parameters, return addresses and a copy of the processor registers when the tasks is ‘swapped out’. Each task has the individual stack, on that the local variables are stored.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…