Thank you for the clarification. I am still having a hard time understanding this. What do you mean by no code which blocks? Does the thread which executes our task (Say a function Loop with 30k loops) block? What does block mean here?
On Wed, Jul 22, 2020 at 7:46 PM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > On 22/07/2020 15:36, Richi Dubey wrote: > > > > > Threads that get created automatically when a CPU starts have their > > scheduler nodes with node->idle set to the thread itself, while the > > nodes that are created due to a task being created have NULL in their > > node->idle (If not using helper function atm). Am I right? > > > > If yes, Why isn't the function _Scheduler_Set_idle_thread() called > > by _Thread_Create_idle_for_CPU? > > > > Trace: > > > > exinit.c -> _Thread_Create_idle -> _Thread_Create_idle_for_CPU > > -> _Scheduler_Start_idle -> _Scheduler_EDF_SMP_Start_idle > > -> _Scheduler_SMP_Do_start_idle ->_Scheduler_SMP_Release_idle_thread . > > > > I am asking this since _Scheduler_Set_idle_thread() is the only > > function that sets the node->idle value. > > I think the description of this member is clear: > > /** > * @brief Scheduler node for per-thread data. > */ > struct Scheduler_Node { > ... > > /** > * @brief The idle thread claimed by this node in case the sticky > level is > * greater than zero and the thread is block or is scheduled on another > * scheduler instance. > * > * This is necessary to ensure the priority ceiling protocols work > across > * scheduler boundaries. > */ > > struct _Thread_Control *idle; > > As I said before, the idle threads are normal threads. The only special > thing is that they execute no code which blocks. You really have to > distinguish between threads and scheduler nodes. > >
_______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel