From: Jiri Slaby <jirislaby@gmail.com>
To: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Mikael Starvik <mikael.starvik@axis.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] CRISv10 serial driver rewrite
Date: Mon, 05 Nov 2007 12:24:38 +0100 [thread overview]
Message-ID: <472EFD76.7000001@gmail.com> (raw)
In-Reply-To: <20071105111839.GI7621@axis.com>
On 11/05/2007 12:18 PM, Jesper Nilsson wrote:
> On Fri, Nov 02, 2007 at 11:39:09AM +0100, Jiri Slaby wrote:
>> On 11/02/2007 10:34 AM, Jesper Nilsson wrote:
>>> @@ -4434,7 +3941,7 @@ block_til_ready(struct tty_struct *tty, struct file * filp,
>>> if (tty_hung_up_p(filp) ||
>>> (info->flags & ASYNC_CLOSING)) {
>>> if (info->flags & ASYNC_CLOSING)
>>> - interruptible_sleep_on(&info->close_wait);
>>> + wait_event_interruptible(info->close_wait, 0);
>> Aiee, this is nonsense, 0 will never be 1, only signal will stop this, use
>> completion instead.
>
> True, I've changed it to use "!info->flags & ASYNC_CLOSING" condition
> for now, as this is a more non-intrusive patch.
> I will look at using completion later, at the same time as using
Aha, then the completion is a bad idea. Just
wait_event_interruptible(info->close_wait, !(info->flags & ASYNC_CLOSING));
as you proposed to use is fine (and you don't need the "if (info->flags &
ASYNC_CLOSING)" test one line above).
regards,
--
Jiri Slaby (jirislaby@gmail.com)
Faculty of Informatics, Masaryk University
prev parent reply other threads:[~2007-11-05 11:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-02 9:34 [PATCH] CRISv10 serial driver rewrite Jesper Nilsson
2007-11-02 10:39 ` Jiri Slaby
2007-11-05 11:18 ` Jesper Nilsson
2007-11-05 11:24 ` Jiri Slaby [this message]
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=472EFD76.7000001@gmail.com \
--to=jirislaby@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=jesper.nilsson@axis.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mikael.starvik@axis.com \
/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.