Doubt regarding thread creation in RTEMS

Sebastian Huber sebastian.huber at embedded-brains.de
Thu Jul 23 06:55:26 UTC 2020


On 23/07/2020 08:12, Richi Dubey wrote:

> 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?

Block means here that the thread calls _Scheduler_Block(). If it 
executes an infinite loop, then it does NOT block. Actually, the default 
implementation of an idle thread body is:

void *_CPU_Thread_Idle_body( uintptr_t ignored )
{
   while ( true ) {
     /* Do nothing */
   }

   return NULL;
}

On most targets, it is an infinite loop which executes a some code which 
puts the processor in a low-power mode.



More information about the devel mailing list