rtems_task acting strange

Angelo Fraietta angelo_f at bigpond.com
Thu Mar 13 21:48:44 UTC 2003


What BSP are you running?

Salman wrote:

>On Wed, 2003-03-12 at 13:37, Joel Sherrill wrote:
>
>>Salman wrote:
>>
>>>Hi guys,
>>>
>>>I'm observing strange behavior when executing the following osif_init
>>>function.
>>>
>>>It gets as far as printing "were gonna startthe task 0 !!!!" (status = 0
>>>-> successful task creation) and waiting for return key.
>>>when I press return key, it goes mental, the screen either starts
>>>dumping infinite garbage, or I get a page of errors with heading related
>>>to thread error or something (i can't fully read it, cos system reboots
>>>straight afterwards)
>>>
>>>any idea whats going wrong ?
>>>
>>If osif_init() is an initialization task and an RTEMS Classic API task, 
>>then it is falling off the bottom and that is a fatal error.  So I think
>>the system is giving a fatal error.  Try adding an
>>rtems_task_delete(RTEMS_SELF)
>>to the bottom instead of a return.
>>
>>For sure the mq task at the bottom is also falling out the bottom since
>>you have commented out the infinite task body loop.
>>
>
>I don't know whether it's my code, or a possible bug in rtems, but one
>thread always gets killed in middle of my program. Hence, I create a
>dummy "victim thread" named "RND0" so that it doesn't kill my main
>thread.
>
>>From my point of view, the following "RND0" thread, should not encounter
>any problems, regardless of what goes on in other threads. I'm not even
>producing any other thread with the same name and it still dies !
>
>For the moment, this approach of having a dummy "victim thread" is
>working for me, so i'm not keen on fixing it, but after my project is
>finished, I'll look into this :)
>
>
>rtems_task
>totest_task(rtems_task_argument args)
>{
>   while (1)
>   {
>           printk ("still awake");
>           rtems_task_wake_after(TICKS_PER_SECOND * 10);
>   }
>
>}
>
>void testfirst()
>{
>
>   rtems_status_code status;
>   rtems_id   Task_id;
>  status = rtems_task_create(
>                  rtems_build_name( 'R', 'N', 'D', '0'),
>                  2, RTEMS_MINIMUM_STACK_SIZE * 2, RTEMS_DEFAULT_MODES,
>                  RTEMS_DEFAULT_ATTRIBUTES, &Task_id);
>  printf("were gonna startthe task %i !!!!",(int)status);
>  getchar();
>  status = rtems_task_start( Task_id,
>totest_task,(rtems_task_argument)0);
>  printf("we just did %i !!!!",(int)status);
>  getchar();
>
>}
>
>rtems_task Init(
>  rtems_task_argument ignored
>)
>{
>  printk( "Hello World\n" );
>
>  getchar();
>  testfirst();
>
>  getchar();
>  sci_init(0);
>  getchar();
>
>  IRM19_GenIf_unit_test_main();
>
>  exit( 0 );
>}
>
>
>

-- 
Angelo Fraietta

PO Box 859
Hamilton NSW 2303

Home Page


http://www.users.bigpond.com/angelo_f/

There are those who seek knowledge for the sake of knowledge - that is CURIOSITY
There are those who seek knowledge to be known by others - that is VANITY
There are those who seek knowledge in order to serve - that is LOVE
    Bernard of Clairvaux (1090 - 1153)


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20030314/411e9b18/attachment-0001.html>


More information about the users mailing list