This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Timeslicing on arm
- From: "Martin Hansen" <farhansen at gmail dot com>
- To: "Martin Hansen" <farhansen at gmail dot com>, ecos-discuss at ecos dot sourceware dot org
- Date: Sat, 6 Sep 2008 02:41:06 +0200
- Subject: Re: [ECOS] Timeslicing on arm
- References: <f6ee2bef0808311220l7cbe5a69o96ac24024e3e5f6c@mail.gmail.com> <20080831192551.GY31987@lunn.ch> <f6ee2bef0808311242q708be8c3tc040fb1fa586a45a@mail.gmail.com> <20080901050720.GQ25863@lunn.ch>
2008/9/1 Andrew Lunn <andrew@lunn.ch>:
> The only way thread2 gets to run is if thread1 is timesliced while it
> has the mutex released.....
This seems to be the case, i did not think of that cyg_io_write would
take a mutex, but it is actually quite resobnaly that it is so, making
writing to the uart threadsafe.
I made the timeslicing work by adding another line inside each loop
(diag_printf)
Thanks for the clear explanation.
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss