[ECOS] Timeslicing on arm
Gary Thomas
gary@mlbassoc.com
Sun Aug 31 20:00:00 GMT 2008
Martin Hansen wrote:
> Hi
>
> I am havinf trouble getting my litle program to work.
> I make two threads each writting to the seriel port, I exspected them
> to both get some output on the port, probably mixed in strange ways.
> (It should be a demo of when to use syncronisation objects.)
>
> But all runtime is given to just the one thread.
>
> They have the same priority, mlque is used as scheduler, and
> CYGSEM_KERNEL_SCHED_TIMESLICE is true
>
>
> It does not apear the that it is the serial port that somehows just
> belongs to one thread or other error, setting a breakpoint in the
> other thread will newer trigger
>
> Below is my small program, it gives just BBBB... on seriel console
<snip>
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.
Try making the main thread sleep until the others finish or
maybe just some arbitrary amount of time and see what happens.
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
More information about the Ecos-discuss
mailing list