On Wed, Jul 30, 2008 at 3:53 AM, Charles Spirakis <[EMAIL PROTECTED]> wrote:
> Paul --
>
> I recompiled owfs removing the EWOULDBLOCK workaround and modified
> ow_com.c to make the open non-blocking. So far things appear to be
>
s/non-blocking/blocking/ ??
working which says either solution works for the ubuntu 7.10
> environment.
>
> I don't know the history of the code to know why non-blocking was
> chosen originally. Any idea if the code started that way? Was it added
> later to fix a problem someone saw?
>
I'll have to look at digitemp or the Public Domain Kit, where the original
serial code came from. It's been modified a few times especially for the
LINK which seems a bit fussier.
Part of the difficulty is that the link and other adapters can send variable
length responses, or even extra characters when presence pulses arrive. For
that reason, the read is wrapped in a select with a timeout. (And we do much
shorter reads and concatenate, which probably loses efficiency). Writes
always seemed deterministic, since we controlled that side of the
conversation, so no time-out was implemented. I suspect that there were some
occasional problems that were attributed to flaky hardware, probably when
the USB/serial was used.
Should we still put a timeout on the writes? Especially if it's blocking?
Paul Alfille
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers