*BSD News Article 10487


Return to BSD News archive

Received: by minnie.vk1xwt.ampr.org with NNTP
	id AA198 ; Fri, 29 Jan 93 11:00:38 EST
Path: sserve!manuel.anu.edu.au!munnari.oz.au!spool.mu.edu!yale.edu!ira.uka.de!math.fu-berlin.de!news.netmbx.de!Germany.EU.net!mcsun!fuug!kiae!newsserv
From: "Andrew A. Chernov, Black Mage" <ache@astral.msk.su>
Newsgroups: comp.unix.bsd
Subject: [386bsd] New patchkit select (beware) & codrvr conflict (with fix)
Date: Wed, 27 Jan 93 16:47:51 +0300
Distribution: world
Organization: Ha-oh-lahm Yetzirah
Message-ID: <mI7AfPhe70@astral.msk.su>
Sender: news-service@newcom.kiae.su
Reply-To: ache@astral.msk.su
Lines: 121

>From postmaster Wed Jan 27 16:44:47 1993
Select patch from new patchkit (waiting on pid instead of *proc)
introduce bug in codrvr keyboard poll, here is a fix:


*** co_hdr.h.sel	Sun Nov 22 18:35:19 1992
--- co_hdr.h	Wed Jan 27 16:21:51 1993
***************
*** 122,128 ****
  	int	cs_timo;	/* timeouts since interrupt (unused) */
  	u_long	cs_wedgecnt;	/* times restarted (unused)*/
  	u_long	cs_ovfl;	/* buffer overflows */
! 	struct proc *cs_selp;	/* Process waiting for select call */
  	int	cs_pgid;	/* Process group for ASYNC I/O */
  /*XXX*/	struct tty *cs_constty;	/* used to restore constty if */
  				/* anyone dares to steal CONSOLE during raw open */
--- 122,128 ----
  	int	cs_timo;	/* timeouts since interrupt (unused) */
  	u_long	cs_wedgecnt;	/* times restarted (unused)*/
  	u_long	cs_ovfl;	/* buffer overflows */
! 	pid_t   cs_rsel;        /* Process waiting for select call */
  	int	cs_pgid;	/* Process group for ASYNC I/O */
  /*XXX*/	struct tty *cs_constty;	/* used to restore constty if */
  				/* anyone dares to steal CONSOLE during raw open */
*** co_kbd.c.sel	Wed Jan 27 15:23:03 1993
--- co_kbd.c	Wed Jan 27 16:31:57 1993
***************
*** 138,144 ****
  	initrb(&co_buf);
  
  	/* signal opening process only */
! 	consoftc.cs_selp = 0;
  	consoftc.cs_pgid = p->p_pid;
  
  	return 0;
--- 138,144 ----
  	initrb(&co_buf);
  
  	/* signal opening process only */
! 	consoftc.cs_rsel = 0;
  	consoftc.cs_pgid = p->p_pid;
  
  	return 0;
***************
*** 156,162 ****
  	if (minor(dev)==0x80) return 0;
  
  	consoftc.cs_flags &= ~(CO_OPENRAW|CO_ASYNC);
! 	consoftc.cs_selp = 0;
  	consoftc.cs_pgid = 0;
  
  	/* do we need to restore console?
--- 156,162 ----
  	if (minor(dev)==0x80) return 0;
  
  	consoftc.cs_flags &= ~(CO_OPENRAW|CO_ASYNC);
! 	consoftc.cs_rsel = 0;
  	consoftc.cs_pgid = 0;
  
  	/* do we need to restore console?
***************
*** 277,285 ****
  
  	if (!(consoftc.cs_flags & CO_OPENRAW))
  		return;
! 	if (consoftc.cs_selp) {
! 		selwakeup(consoftc.cs_selp,0);
! 		consoftc.cs_selp = 0;
  	}
  	if (consoftc.cs_flags & CO_ASYNC) {
  		if (consoftc.cs_pgid < 0)
--- 277,285 ----
  
  	if (!(consoftc.cs_flags & CO_OPENRAW))
  		return;
! 	if (consoftc.cs_rsel) {
! 		selwakeup(consoftc.cs_rsel,0);
! 		consoftc.cs_rsel = 0;
  	}
  	if (consoftc.cs_flags & CO_ASYNC) {
  		if (consoftc.cs_pgid < 0)
***************
*** 306,312 ****
  			splx(s);
  			return 1;
  		}
! 		consoftc.cs_selp = p;
  	}
  	splx(s);
  	return 0;
--- 306,312 ----
  			splx(s);
  			return 1;
  		}
! 		consoftc.cs_rsel = p->p_pid;
  	}
  	splx(s);
  	return 0;
***************
*** 1182,1188 ****
  				consoftc.cs_flags |= CO_OPENRAW;
  			ofl = 0;
  		}
! 		consoftc.cs_selp = 0;
  		break;
  	case KBDRESET8042:
  		doreset();
--- 1182,1188 ----
  				consoftc.cs_flags |= CO_OPENRAW;
  			ofl = 0;
  		}
! 		consoftc.cs_rsel = 0;
  		break;
  	case KBDRESET8042:
  		doreset();
-- 
In-This-Life:  Andrew A. Chernov    |  "Hay mas dicha, mas contento
Internet:      ache@astral.msk.su   |  "Que adorar una hermosura
FIDOnet:       2:5020/23.34         |  "Brujuleada entre los lejos
Organization:  The RELCOM Corp.     |  "De lo imposible?!"  (Calderon)