What is the thread working area actually used for?

Discussions and support about ChibiOS/RT, the free embedded RTOS.
carldong
Posts: 62
Joined: Wed Oct 15, 2014 6:08 pm
Has thanked: 1 time
Been thanked: 1 time

What is the thread working area actually used for?

Postby carldong » Fri Apr 07, 2017 12:16 am

According to documentations I found, it seems to be used for "context switching". However, I find it hard to estimate how much working space is actually needed. I find it intriguing to dig through the code because I couldn't find a straightforward way to search for relevant code. I boil down my questions into these:

- Does each OS call use some?
- Does context switching change the stack pointer address?
- Is it only the system calls that consumes working space? Or does local variables to a thread also use said thread stack?

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: What is the thread working area actually used for?

Postby Giovanni » Fri Apr 07, 2017 7:48 am

The working area is the thread stack area, anything using stack requires space there.

Giovanni


Return to “ChibiOS/RT”

Who is online

Users browsing this forum: No registered users and 7 guests