Which threads execute _Thread_Handler ?

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Dec 4 08:05:39 UTC 2020


On 04/12/2020 08:56, Richi Dubey wrote:

>
> When I am trying to debug tm24 running on the Strong APA scheduler 
> code, I can see that the thread which comes after the call 
> to _CPU_Context_switch, resumes execution from the same code (next 
> line in the _Thread_Do_dispatch function after _CPU_Context_switch), 
> whereas when the same code is run on a different scheduler (the 
> default sp scheduler) the heir thread that executes after the call 
> to _CPU_Context_switch starts executing from  _Thread_Handler and does 
> not resume its execution from the _Thread_Do_dispatch (which has the 
> context_switch function call).
>
> Why is this happening? Is the scheduler responsible for this?

I have currently no time to help you debugging this issue.

Each thread starts the execution in _Thread_Handler(). A context switch 
returns to _Thread_Do_dispatch() or jumps to _Thread_Handler(). The 
_Thread_Handler() completes the context switch, does some general calls 
to begin the thread execution and then calls the thread entry function.

-- 
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.huber at embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/



More information about the devel mailing list