[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: |
31 Jan 2002 01:03:33 -0800 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 |
Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de> writes:
> On Wed, Jan 30, 2002 at 02:52:30PM -0800, Thomas Bushnell, BSG wrote:
> > The Right Thing is surely two separate threads. I'm not sure that
> > select is really necessary at all however.
>
> I have stumbled upon an obscure race where it helps. I am not sure if
> it is worth the use of io_select, I will leave this for you to decide.
A race should always be avoided if it makes a bug. But there may be a
way to avoid it without select.
> The issue I am talking about is implementing pending_output_size correctly,
> which should return the number of bytes pending for output. The problem
> exists only for ioports that have the tiocoutq capability. Because we don't
> know if the underlying translator already has received the io_write or not,
> we don't know what the correct return value is:
pending_output_size is always approximate. Users cannot rely on it
being totally synchronized. The situation you describe here occurs
for almost all serial hardware in existence, and it's not a reason to
worry about anything else. So this case is a sort of race, but it's
not a bug, because we don't actually need to worry about the exact
value.
> Now, after the signature, an excerpt from the current implementation of the
> writer loop. What do you think?
Looks reasonable to me. I assume that this function is the only one
that mucks with the pending_output array?
- Re: term & user space console, (continued)
- Re: term & user space console, Marcus Brinkmann, 2002/01/30
- Re: term & user space console, Thomas Bushnell, BSG, 2002/01/30
- Re: term & user space console, Marcus Brinkmann, 2002/01/30
- Re: term & user space console, Roland McGrath, 2002/01/30
- Re: term & user space console, Thomas Bushnell, BSG, 2002/01/30
- Re: term & user space console, Thomas Bushnell, BSG, 2002/01/30
- Re: term & user space console, Marcus Brinkmann, 2002/01/30
- Re: term & user space console, Marcus Brinkmann, 2002/01/30
- Re: term & user space console, Marcus Brinkmann, 2002/01/30
- Re: term & user space console, Niels Möller, 2002/01/31
- Re: term & user space console,
Thomas Bushnell, BSG <=
- Re: term & user space console, Marcus Brinkmann, 2002/01/31
- Re: term & user space console, Thomas Bushnell, BSG, 2002/01/31
- Re: term & user space console, Marcus Brinkmann, 2002/01/31
- Re: term & user space console, Roland McGrath, 2002/01/31
- Re: term & user space console, Marcus Brinkmann, 2002/01/31
- Re: term & user space console, Roland McGrath, 2002/01/31
- Re: term & user space console, Thomas Bushnell, BSG, 2002/01/31
- Re: term & user space console, Marcus Brinkmann, 2002/01/31
- Re: term & user space console, Thomas Bushnell, BSG, 2002/01/31
- Re: term & user space console, Marcus Brinkmann, 2002/01/31