Marcus Brinkmann <[EMAIL PROTECTED]> writes:

> The obvious difference is what happens to data that is available in the
> underlying file while CREAD is turned off.  Both, devio and ptyio discard
> such data, while in your design it would be delayed until CREAD is enabled.
> I couldn't find out what is the right thing (the standards just say "enable
> receiver" about CREAD).

It shouldn't be delayed, that would be a bug in my pseudocode.

On a real serial line, it gets dropped.

However, dropping it might involve a CPU spin, so some more thought
needs to happen I think.

> while (1)
>   while (output suspended or queue empty)
>     block until output resumed and queue non-empty
>   write data -- blocking
> 
> so basically the same, just taking output stopped into consideration.

By "data remains to be written" I was including stopped and all such
tests. :)

> Mmmh.  There probably is a way, but I am not aware of it.  Note that I was
> thinking about using io_select, not the glibc select function.

Um, the way is to interrupt it just like you interrupt a read...

> Mmmh.  Interesting, and I see how term does this to the user.  But how 
> would the underlying node inform the bottom handler about it (in the
> transparent model).

You'd need to create the process hair, and use term_open_ctty.  It
will then send signals at your process.



_______________________________________________
Bug-hurd mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-hurd

Reply via email to