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