<div dir="ltr"><div>Hello all!</div>
<p> I'm using RTEMS 4.8, in a target platform sparc, the BSP is leon2.<br> I'm running the sparc applications with TSIM2.</p>
<p>The problem occurs randomly on the RTEMS/TSIM platform. When I compile sparc programs with a specific combination of instructions I have no compilation errors, but when I run the application the program simply hangs up.</p>

<p>I put below an example of a simple program that hangs up on RTEMS/TSIM platform.<br> If I uncomment the line "//printf("end\n");" the program runs fine. Would you have a clue for me????</p>
<p>The program runs on tsim-leon with or without that line for me.  When a POSIX thread<br>exits, it is not an error.  Your thread is falling off the bottom and is silently deleted.<br>Then the IDLE task is running.  Same with and without the line and the behavior<br>
is correct as defined.</p>
<p><br>/* -- system includes -- */</p>
<p>#include <stdio.h></p>
<p>#include <time.h></p>
<p>#include <bsp.h></p>
<p>#include <string.h></p>
<p>#include <pthread.h></p>
<p>#include <time.h></p>
<p>#include <errno.h></p>
<p>#include <stdio.h></p>
<p>#include <stdlib.h></p>
<p>/* --------------------- */</p>
<p>void *POSIX_Init( void *argument )</p>
<p>{</p>
<p>//--- simple application -----------------------------------------//</p>
<p>int i2;</p>
<p>int i;</p>
<p>printf("-----------------------------\n");</p>
<p>printf(" Simple program v1.0 \n");</p>
<p>printf("-----------------------------\n");</p>
<p>i=0;</p>
<p>i2=12;</p>
<p>i2 = i2 * i;</p>
<p>printf("i2 = %d\n",i2);</p>
<p>i = i * 4;</p>
<p>printf("i = %d\n", i);</p>
<p>//printf("end\n");</p>
<p>//--- end ---------------------------------------------------------//</p>
<p>}</p>
<p>#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20</p>
<p>#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM</p>
<p>#define CONFIGURE_MAXIMUM_POSIX_THREADS 128</p>
<p>#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 120</p>
<p>#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 60</p>
<p>#define CONFIGURE_MAXIMUM_TIMERS 10</p>
<p>#define CONFIGURE_MAXIMUM_RTEMS_TIMERS CONFIGURE_MAXIMUM_TIMERS</p>
<p>#define CONFIGURE_MAXIMUM_POSIX_TIMERS CONFIGURE_MAXIMUM_TIMERS</p>
<p>#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER</p>
<p>#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER</p>
<p>#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER</p>
<p>#define CONFIGURE_MICROSECONDS_PER_TICK 10</p>
<p>#define CONFIGURE_MAXIMUM_TASKS 10</p>
<p>#define CONFIGURE_POSIX_INIT_THREAD_TABLE</p>
<p> <br>#define CONFIGURE_INIT</p>
<p> <br>#include <rtems/confdefs.h></p>
<p> <br>/* end of file */</p>
<p>#endif</p>
<p>Thanks a lot!!</p>
<p>Cássia</p></div>