bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: term & user space console


From: Thomas Bushnell, BSG
Subject: Re: term & user space console
Date: 30 Jan 2002 16:15:03 -0800
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1

Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de> 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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]