Change wakeup to endtsleep, because wakeup don't produce timeout
state, cause infinite wakeups loop in ttywait
This commit is contained in:
parent
fa1f0e90fb
commit
92915f5044
@ -31,7 +31,7 @@
|
|||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
|
* 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"
|
#include "sio.h"
|
||||||
@ -899,6 +899,7 @@ sioclose(dev, flag, mode, p)
|
|||||||
int mynor;
|
int mynor;
|
||||||
int s;
|
int s;
|
||||||
struct tty *tp;
|
struct tty *tp;
|
||||||
|
void endtsleep __P((void *));
|
||||||
|
|
||||||
mynor = minor(dev);
|
mynor = minor(dev);
|
||||||
if (mynor & CONTROL_MASK)
|
if (mynor & CONTROL_MASK)
|
||||||
@ -906,9 +907,9 @@ sioclose(dev, flag, mode, p)
|
|||||||
com = com_addr(MINOR_TO_UNIT(mynor));
|
com = com_addr(MINOR_TO_UNIT(mynor));
|
||||||
tp = com->tp;
|
tp = com->tp;
|
||||||
s = spltty();
|
s = spltty();
|
||||||
timeout(wakeup, TSA_OCOMPLETE(tp), 60 * hz);
|
timeout(endtsleep, (void *)p, 60 * hz);
|
||||||
(*linesw[tp->t_line].l_close)(tp, flag);
|
(*linesw[tp->t_line].l_close)(tp, flag);
|
||||||
untimeout(wakeup, TSA_OCOMPLETE(tp));
|
untimeout(endtsleep, (void *)p);
|
||||||
siostop(tp, FREAD | FWRITE);
|
siostop(tp, FREAD | FWRITE);
|
||||||
comhardclose(com);
|
comhardclose(com);
|
||||||
ttyclose(tp);
|
ttyclose(tp);
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
|
* 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"
|
#include "sio.h"
|
||||||
@ -899,6 +899,7 @@ sioclose(dev, flag, mode, p)
|
|||||||
int mynor;
|
int mynor;
|
||||||
int s;
|
int s;
|
||||||
struct tty *tp;
|
struct tty *tp;
|
||||||
|
void endtsleep __P((void *));
|
||||||
|
|
||||||
mynor = minor(dev);
|
mynor = minor(dev);
|
||||||
if (mynor & CONTROL_MASK)
|
if (mynor & CONTROL_MASK)
|
||||||
@ -906,9 +907,9 @@ sioclose(dev, flag, mode, p)
|
|||||||
com = com_addr(MINOR_TO_UNIT(mynor));
|
com = com_addr(MINOR_TO_UNIT(mynor));
|
||||||
tp = com->tp;
|
tp = com->tp;
|
||||||
s = spltty();
|
s = spltty();
|
||||||
timeout(wakeup, TSA_OCOMPLETE(tp), 60 * hz);
|
timeout(endtsleep, (void *)p, 60 * hz);
|
||||||
(*linesw[tp->t_line].l_close)(tp, flag);
|
(*linesw[tp->t_line].l_close)(tp, flag);
|
||||||
untimeout(wakeup, TSA_OCOMPLETE(tp));
|
untimeout(endtsleep, (void *)p);
|
||||||
siostop(tp, FREAD | FWRITE);
|
siostop(tp, FREAD | FWRITE);
|
||||||
comhardclose(com);
|
comhardclose(com);
|
||||||
ttyclose(tp);
|
ttyclose(tp);
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
|
* 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"
|
#include "sio.h"
|
||||||
@ -899,6 +899,7 @@ sioclose(dev, flag, mode, p)
|
|||||||
int mynor;
|
int mynor;
|
||||||
int s;
|
int s;
|
||||||
struct tty *tp;
|
struct tty *tp;
|
||||||
|
void endtsleep __P((void *));
|
||||||
|
|
||||||
mynor = minor(dev);
|
mynor = minor(dev);
|
||||||
if (mynor & CONTROL_MASK)
|
if (mynor & CONTROL_MASK)
|
||||||
@ -906,9 +907,9 @@ sioclose(dev, flag, mode, p)
|
|||||||
com = com_addr(MINOR_TO_UNIT(mynor));
|
com = com_addr(MINOR_TO_UNIT(mynor));
|
||||||
tp = com->tp;
|
tp = com->tp;
|
||||||
s = spltty();
|
s = spltty();
|
||||||
timeout(wakeup, TSA_OCOMPLETE(tp), 60 * hz);
|
timeout(endtsleep, (void *)p, 60 * hz);
|
||||||
(*linesw[tp->t_line].l_close)(tp, flag);
|
(*linesw[tp->t_line].l_close)(tp, flag);
|
||||||
untimeout(wakeup, TSA_OCOMPLETE(tp));
|
untimeout(endtsleep, (void *)p);
|
||||||
siostop(tp, FREAD | FWRITE);
|
siostop(tp, FREAD | FWRITE);
|
||||||
comhardclose(com);
|
comhardclose(com);
|
||||||
ttyclose(tp);
|
ttyclose(tp);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user