This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Blocking input on diagnostics
- To: Robert Cragie <rcc at jennic dot com>
- Subject: Re: [ECOS] Blocking input on diagnostics
- From: Grant Edwards <grante at visi dot com>
- Date: Tue, 13 Mar 2001 08:50:00 -0600
- Cc: ecos-discuss at sources dot redhat dot com
- References: <NDBBLOIOMLKELOJBAPAGKEAFCEAA.rcc@jennic.com>
On Tue, Mar 13, 2001 at 08:57:54AM -0000, Robert Cragie wrote:
> I have upgraded to the recent CVS version and have done a port
> to the ARM integrator platform based on my 1.3.1 port and
> looking at the changes to the PID board.
>
> Everything works OK, except that I notice that stdin through
> the diagnostics uses a busy wait, which is undesirable for the
> usual reasons.
I recently modified my hal diag input routines to treat a delay
count of 1 as zero delay (2 == 1ms, etc.). Changing the
timeout in main.c to 1ms then results in no busy-wait loop. Both
network and serial-I/O performance improved significantly.
You do need to update the system time stored in ticks.c
periodically in the main loop if none of the busy-wait loops
are calling the 1ms delay routine.
[The next layer up treats a delay count of 0ms as "wait
forever" by calling the blocking input routine, so you can't
use 0ms as zero-delay without more extensive changes.]
--
Grant Edwards
grante@visi.com