[ell-i-developers] Re: Context Switching

  • From: Pekka Nikander <pekka.nikander@xxxxxx>
  • To: ell-i-developers@xxxxxxxxxxxxx
  • Date: Tue, 4 Feb 2014 09:38:00 +0200

> After checking the current implementation of the threading system, I can 
> particularly see two important elements:
> 
> First, the ARM-M0 is designed to simplify context switching (two stack 
> pointers, interrupt and threading mode, partial context already stored at 
> interrupt state, etc.)

Correct :-)  Please have a look at Cortex-M4 as well, as we want to support 
also it.

> Second, the context switching implementation seems quite functional, the 
> scheduler is the one that is still in progress. It is like the basic layer 
> for threading is already developed (maybe needs to be tested)
> 
> What was the last state of that part, the oct9-demo branch when you stop 
> coding for it?

Honestly, I simply don't remember properly.  IIRC, it was functional, at least 
most of the time, sans perhaps some corner cases.  That is, I'm not aware of 
any bugs in the lowest level threading code in the oct9-demo branch, but there 
may be corner cases where it works wrong.

> What would be the initial state for new development. In particular, I was 
> thinking on defining the interfaces ASAP, in order to complete the API with 
> reference to those parts and allow better matching when the threading part 
> would be ready.

Sounds like a plan.  :-)

> I am preparing a document for the wiki, as suggested by Teemu, to explain and 
> fully understand the current context switching implementation (and possible 
> design decisions taken for that)

Excellent!  

--Pekka



Other related posts: