This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Blocking input on diagnostics


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]