Some RTEMS Questions

Chris Johns chrisj at rtems.org
Fri Jul 8 01:23:24 UTC 2005


Doyle, Bryon Thomas (Bryon) wrote:
> Hello I am working on a RTEMS port to a CSB472 board along with Ed Sutter.

Welcome.

> I have a couple questions about RTEMS that are not covered in the documentation.
> First of all, I have a simple question about what happens to RTEMS after the
> deletion of the only task.

Does this include the IDLE task ?

> In the process of the port, I have began to run
> some of the sample code and noticed something strange. After the task is to
> make a call to delete itself the RTEMS scheduler seems to go haywire, the task
> scheduler seems to want to execute the deleted task, and keeps trying to switch.
> This continues for approximately 80 iterations, then a fatal error is generated.

Is this the Init task ?

Does this happen with this code for init ?

#include <rtems.h>
void Init ()
{
   rtems_task_delete (RTEMS_SELF);
}

I would expect IDLE to be left running for-ever.

The 'exit' call should clean up and return you to the BSP just after the 
rtems_initialize_executive_late call.

> I have not made any modifications to the internals of the task scheduler in RTEMS.
> The question I have is what is the expected behavior of RTEMS following it deleting
> the only task? Does it go to the Idle task and sit forever? or should it exit
> gracefully and return control to a monitor running on the board.

IDLE is a task so unless you delete this task IDLE should be run and it 
will do what-ever your idle is suppose to do. Idle can be different for 
each CPU and your BSP can define your own idle if you need to manage 
power. On the m68k idle is a stop instruction in a loop.

-- 
  Chris Johns
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hw.c
Type: text/x-c
Size: 151 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/users/attachments/20050708/cdbfd9f8/attachment.bin>


More information about the users mailing list