All of lore.kernel.org
 help / color / mirror / Atom feed
From: Grant Edwards <grant.b.edwards@gmail.com>
To: linux-serial@vger.kernel.org
Subject: Re: tty loop-back device
Date: Sun, 29 Sep 2013 03:21:26 +0000 (UTC)	[thread overview]
Message-ID: <l286bm$239$1@ger.gmane.org> (raw)
In-Reply-To: l27esn$cn6$1@ger.gmane.org

On 2013-09-28, Matwey V. Kornilov <matwey.kornilov@gmail.com> wrote:
> 28.09.2013 21:21, Matwey V. Kornilov ?????:
>> It seems that BSD and Unix98 pty's may coexist in pty.c. So, there is a
>> chance that it is possible to add support of Extended pty not breaking
>> existing things. One need to be a brave to change something in pty.c, It
>> is quite critical part.
>
> It seems that we need new line discipline to allow async notification of 
> master tty when the client changes tty->termios. poll() has to be 
> reimplemented to generate POLLPRI, when tty->termios handling required 
> on the master side, then master may use special ioctl to read 
> tty->termios requested.

I was thinking about initially just creating a blocking ioctl() call
that the master can use to wait for either a termios configuration
change or a modem control line change.  I admit that's not as elegent:
it would mean a master would need multiple threads in most cases (one
for data and one for config and modem status).  But, it may be a less
intrusive change [I haven't looked at the poll implementation in any
detail, so perhaps the poll change isn't as bad as I fear.]

Having to use multiple threads in a master sounds ugly at first, but
it's still orders of magnitude easier than implementing a serial
driver in kernel space that uses network I/O to communicate with the
physical UART.

-- 
Grant


  reply	other threads:[~2013-09-29  3:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-28 12:59 tty loop-back device Matwey V. Kornilov
2013-09-28 16:03 ` Grant Edwards
2013-09-28 17:15   ` Greg KH
2013-09-28 17:21   ` Matwey V. Kornilov
2013-09-28 20:41     ` Matwey V. Kornilov
2013-09-29  3:21       ` Grant Edwards [this message]
2013-09-29  7:09         ` Matwey V. Kornilov
2013-09-30 22:28           ` Grant Edwards

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='l286bm$239$1@ger.gmane.org' \
    --to=grant.b.edwards@gmail.com \
    --cc=linux-serial@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.