1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-20 02:38:43 +00:00

Change wakeup to endtsleep, because wakeup don't produce timeout

state, cause infinite wakeups loop in ttywait
This commit is contained in:
Andrey A. Chernov 1994-12-01 23:48:09 +00:00
parent fa1f0e90fb
commit 92915f5044
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=4894
3 changed files with 12 additions and 9 deletions

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
* $Id: sio.c,v 1.59 1994/11/01 23:09:29 bde Exp $
* $Id: sio.c,v 1.60 1994/11/06 00:23:45 bde Exp $
*/
#include "sio.h"
@ -899,6 +899,7 @@ sioclose(dev, flag, mode, p)
int mynor;
int s;
struct tty *tp;
void endtsleep __P((void *));
mynor = minor(dev);
if (mynor & CONTROL_MASK)
@ -906,9 +907,9 @@ sioclose(dev, flag, mode, p)
com = com_addr(MINOR_TO_UNIT(mynor));
tp = com->tp;
s = spltty();
timeout(wakeup, TSA_OCOMPLETE(tp), 60 * hz);
timeout(endtsleep, (void *)p, 60 * hz);
(*linesw[tp->t_line].l_close)(tp, flag);
untimeout(wakeup, TSA_OCOMPLETE(tp));
untimeout(endtsleep, (void *)p);
siostop(tp, FREAD | FWRITE);
comhardclose(com);
ttyclose(tp);

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
* $Id: sio.c,v 1.59 1994/11/01 23:09:29 bde Exp $
* $Id: sio.c,v 1.60 1994/11/06 00:23:45 bde Exp $
*/
#include "sio.h"
@ -899,6 +899,7 @@ sioclose(dev, flag, mode, p)
int mynor;
int s;
struct tty *tp;
void endtsleep __P((void *));
mynor = minor(dev);
if (mynor & CONTROL_MASK)
@ -906,9 +907,9 @@ sioclose(dev, flag, mode, p)
com = com_addr(MINOR_TO_UNIT(mynor));
tp = com->tp;
s = spltty();
timeout(wakeup, TSA_OCOMPLETE(tp), 60 * hz);
timeout(endtsleep, (void *)p, 60 * hz);
(*linesw[tp->t_line].l_close)(tp, flag);
untimeout(wakeup, TSA_OCOMPLETE(tp));
untimeout(endtsleep, (void *)p);
siostop(tp, FREAD | FWRITE);
comhardclose(com);
ttyclose(tp);

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
* $Id: sio.c,v 1.59 1994/11/01 23:09:29 bde Exp $
* $Id: sio.c,v 1.60 1994/11/06 00:23:45 bde Exp $
*/
#include "sio.h"
@ -899,6 +899,7 @@ sioclose(dev, flag, mode, p)
int mynor;
int s;
struct tty *tp;
void endtsleep __P((void *));
mynor = minor(dev);
if (mynor & CONTROL_MASK)
@ -906,9 +907,9 @@ sioclose(dev, flag, mode, p)
com = com_addr(MINOR_TO_UNIT(mynor));
tp = com->tp;
s = spltty();
timeout(wakeup, TSA_OCOMPLETE(tp), 60 * hz);
timeout(endtsleep, (void *)p, 60 * hz);
(*linesw[tp->t_line].l_close)(tp, flag);
untimeout(wakeup, TSA_OCOMPLETE(tp));
untimeout(endtsleep, (void *)p);
siostop(tp, FREAD | FWRITE);
comhardclose(com);
ttyclose(tp);