[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081120155502.608812d9@lxorguk.ukuu.org.uk>
Date: Thu, 20 Nov 2008 15:55:02 +0000
From: Alan Cox <alan@...rguk.ukuu.org.uk>
To: Thomas Pfaff <tpfaff@....com>
Cc: linux-kernel@...r.kernel.org
Subject: Re: Question about TTY_DO_WRITE_WAKEUP
> But n_tty_write_wakeup is only called from tty_wakeup when this bit is already
> set, therefore it makes no sense to set this bit in n_tty_write_wakeup again.
The base code should probably really use test_and_clear_bit() when
calling that method.
>
> The flow looks to me as
>
> If the tty driver sets TTY_DO_WRITE_WAKEUP a SIGIO is generated on every
> tty_wakeup.
>
> If it is not set then n_tty_write_wakeup is never called and a SIGIO is not
> generated.
Which isn't perfect (excess SIGIO cases) but doesn't seem incorrect. If
you've not blocked the tty output buffer then write() has not returned a
short write and no SIGIO is due.
Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists