This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Timeslicing on arm
2008/8/31 Gary Thomas <gary@mlbassoc.com>:
> The fact that it only prints "BBBB" should tell you something.
> When the main thread terminates (via the return), the whole
> system will shortly stop - that's just how things work.
No, sorry You misunderstood what i said, with '...' i was trying to
ilustrate that B's is comming in one long stream,
Exeting main will not stop the system, it just puts the main thread in
suspended. whilst B and C thread continues to run, that is C is newer
alowed to run.
I have made a small change
while( 1 )
{
//cyg_thread_delay( 2 );
cyg_io_write(serhand, strW , &len);
diag_printf("C\n");
}
adding the diag_prinf() seams to help, now i get strings from both
threads, mixed up like intended.
Maybe the compiler is optimizin to much away, and cyg_io_write makes
use of a mutex, anyone how knows?
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss