Set PTS_FINISHED before waking up any threads.

Inside ptsdrv_{in,out}wakeup() we call KNOTE_LOCKED() to wake up any
kevent(2) users. Because the kqueue handlers are executed synchronously,
we must set PTS_FINISHED before calling ptsdrv_{in,out}wakeup().

Discovered by:	nork
This commit is contained in:
Ed Schouten 2008-12-21 21:16:57 +00:00
parent e9f541267d
commit 67dd0ccbee

View file

@ -630,10 +630,9 @@ ptsdrv_close(struct tty *tp)
struct pts_softc *psc = tty_softc(tp);
/* Wake up any blocked readers/writers. */
psc->pts_flags |= PTS_FINISHED;
ptsdrv_outwakeup(tp);
ptsdrv_inwakeup(tp);
psc->pts_flags |= PTS_FINISHED;
}
static void