Synchronize with sys/i386/isa/mse.c, pcaudio.c, sio.c and syscons.c
revisions 1.34, 1.37, 1.181 and 1.232, respectively.
This commit is contained in:
parent
5227e33604
commit
e70ee0f24b
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
|
||||
* $Id: sio.c,v 1.35 1997/08/30 15:47:49 kato Exp $
|
||||
* $Id: sio.c,v 1.36 1997/09/01 10:45:02 kato Exp $
|
||||
*/
|
||||
|
||||
#include "opt_comconsole.h"
|
||||
@ -443,7 +443,7 @@ static d_devtotty_t siodevtotty;
|
||||
static struct cdevsw sio_cdevsw = {
|
||||
sioopen, sioclose, sioread, siowrite,
|
||||
sioioctl, siostop, noreset, siodevtotty,
|
||||
ttselect, nommap, NULL, driver_name,
|
||||
ttpoll, nommap, NULL, driver_name,
|
||||
NULL, -1,
|
||||
};
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
* this software for any purpose. It is provided "as is"
|
||||
* without express or implied warranty.
|
||||
*
|
||||
* $Id: mse.c,v 1.10 1997/03/24 12:29:37 bde Exp $
|
||||
* $Id: mse.c,v 1.11 1997/07/21 13:11:06 kato Exp $
|
||||
*/
|
||||
/*
|
||||
* Driver for the Logitech and ATI Inport Bus mice for use with 386bsd and
|
||||
@ -51,6 +51,7 @@
|
||||
#include <sys/conf.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/poll.h>
|
||||
#include <sys/uio.h>
|
||||
#ifdef DEVFS
|
||||
#include <sys/devfsext.h>
|
||||
@ -73,13 +74,13 @@ struct isa_driver msedriver = {
|
||||
static d_open_t mseopen;
|
||||
static d_close_t mseclose;
|
||||
static d_read_t mseread;
|
||||
static d_select_t mseselect;
|
||||
static d_poll_t msepoll;
|
||||
|
||||
#define CDEV_MAJOR 27
|
||||
static struct cdevsw mse_cdevsw =
|
||||
{ mseopen, mseclose, mseread, nowrite, /*27*/
|
||||
noioc, nostop, nullreset, nodevtotty,/* mse */
|
||||
mseselect, nommap, NULL, "mse", NULL, -1 };
|
||||
msepoll, nommap, NULL, "mse", NULL, -1 };
|
||||
|
||||
|
||||
/*
|
||||
@ -427,31 +428,34 @@ mseread(dev, uio, ioflag)
|
||||
}
|
||||
|
||||
/*
|
||||
* mseselect: check for mouse input to be processed.
|
||||
* msepoll: check for mouse input to be processed.
|
||||
*/
|
||||
static int
|
||||
mseselect(dev, rw, p)
|
||||
msepoll(dev, events, p)
|
||||
dev_t dev;
|
||||
int rw;
|
||||
int events;
|
||||
struct proc *p;
|
||||
{
|
||||
register struct mse_softc *sc = &mse_sc[MSE_UNIT(dev)];
|
||||
int s;
|
||||
int revents = 0;
|
||||
|
||||
s = spltty();
|
||||
if (sc->sc_bytesread != PROTOBYTES || sc->sc_deltax != 0 ||
|
||||
sc->sc_deltay != 0 || (sc->sc_obuttons ^ sc->sc_buttons) != 0) {
|
||||
splx(s);
|
||||
return (1);
|
||||
}
|
||||
if (events & (POLLIN | POLLRDNORM))
|
||||
if (sc->sc_bytesread != PROTOBYTES || sc->sc_deltax != 0 ||
|
||||
sc->sc_deltay != 0 ||
|
||||
(sc->sc_obuttons ^ sc->sc_buttons) != 0)
|
||||
revents |= events & (POLLIN | POLLRDNORM);
|
||||
else {
|
||||
/*
|
||||
* Since this is an exclusive open device, any previous
|
||||
* proc pointer is trash now, so we can just assign it.
|
||||
*/
|
||||
selrecord(p, &sc->sc_selp);
|
||||
}
|
||||
|
||||
/*
|
||||
* Since this is an exclusive open device, any previous proc.
|
||||
* pointer is trash now, so we can just assign it.
|
||||
*/
|
||||
selrecord(p, &sc->sc_selp);
|
||||
splx(s);
|
||||
return (0);
|
||||
return (revents);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -25,7 +25,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: pcaudio.c,v 1.10 1997/09/04 13:20:33 kato Exp $
|
||||
* $Id: pcaudio.c,v 1.11 1997/09/07 12:46:44 kato Exp $
|
||||
*/
|
||||
|
||||
#include "pca.h"
|
||||
@ -39,6 +39,7 @@
|
||||
#include <sys/proc.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/filio.h>
|
||||
#include <sys/poll.h>
|
||||
|
||||
#include <machine/clock.h>
|
||||
#include <machine/pcaudioio.h>
|
||||
@ -80,7 +81,7 @@ static struct pca_status {
|
||||
char current; /* current buffer */
|
||||
unsigned char oldval; /* old timer port value */
|
||||
char timer_on; /* is playback running */
|
||||
struct selinfo wsel; /* select status */
|
||||
struct selinfo wsel; /* select/poll status */
|
||||
char non_block; /* set non-block on write status */
|
||||
} pca_status;
|
||||
|
||||
@ -109,13 +110,13 @@ static d_open_t pcaopen;
|
||||
static d_close_t pcaclose;
|
||||
static d_write_t pcawrite;
|
||||
static d_ioctl_t pcaioctl;
|
||||
static d_select_t pcaselect;
|
||||
static d_poll_t pcapoll;
|
||||
|
||||
#define CDEV_MAJOR 24
|
||||
static struct cdevsw pca_cdevsw =
|
||||
{ pcaopen, pcaclose, noread, pcawrite, /*24*/
|
||||
pcaioctl, nostop, nullreset, nodevtotty,/* pcaudio */
|
||||
pcaselect, nommap, NULL, "pca", NULL, -1 };
|
||||
pcapoll, nommap, NULL, "pca", NULL, -1 };
|
||||
|
||||
static void pca_continue __P((void));
|
||||
static void pca_init __P((void));
|
||||
@ -527,29 +528,29 @@ pcaintr(struct clockframe *frame)
|
||||
|
||||
|
||||
static int
|
||||
pcaselect(dev_t dev, int rw, struct proc *p)
|
||||
pcapoll(dev_t dev, int events, struct proc *p)
|
||||
{
|
||||
int s = spltty();
|
||||
int s;
|
||||
struct proc *p1;
|
||||
int revents = 0;
|
||||
|
||||
switch (rw) {
|
||||
s = spltty();
|
||||
|
||||
case FWRITE:
|
||||
if (!pca_status.in_use[0] || !pca_status.in_use[1] || !pca_status.in_use[2]) {
|
||||
splx(s);
|
||||
return(1);
|
||||
}
|
||||
if (pca_status.wsel.si_pid && (p1=pfind(pca_status.wsel.si_pid))
|
||||
&& p1->p_wchan == (caddr_t)&selwait)
|
||||
pca_status.wsel.si_flags = SI_COLL;
|
||||
else
|
||||
pca_status.wsel.si_pid = p->p_pid;
|
||||
splx(s);
|
||||
return 0;
|
||||
default:
|
||||
splx(s);
|
||||
return(0);
|
||||
}
|
||||
if (events & (POLLOUT | POLLWRNORM))
|
||||
if (!pca_status.in_use[0] || !pca_status.in_use[1] ||
|
||||
!pca_status.in_use[2])
|
||||
revents |= events & (POLLOUT | POLLWRNORM);
|
||||
else {
|
||||
if (pca_status.wsel.si_pid &&
|
||||
(p1=pfind(pca_status.wsel.si_pid))
|
||||
&& p1->p_wchan == (caddr_t)&selwait)
|
||||
pca_status.wsel.si_flags = SI_COLL;
|
||||
else
|
||||
pca_status.wsel.si_pid = p->p_pid;
|
||||
}
|
||||
|
||||
splx(s);
|
||||
return (revents);
|
||||
}
|
||||
|
||||
static pca_devsw_installed = 0;
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
|
||||
* $Id: sio.c,v 1.35 1997/08/30 15:47:49 kato Exp $
|
||||
* $Id: sio.c,v 1.36 1997/09/01 10:45:02 kato Exp $
|
||||
*/
|
||||
|
||||
#include "opt_comconsole.h"
|
||||
@ -443,7 +443,7 @@ static d_devtotty_t siodevtotty;
|
||||
static struct cdevsw sio_cdevsw = {
|
||||
sioopen, sioclose, sioread, siowrite,
|
||||
sioioctl, siostop, noreset, siodevtotty,
|
||||
ttselect, nommap, NULL, driver_name,
|
||||
ttpoll, nommap, NULL, driver_name,
|
||||
NULL, -1,
|
||||
};
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: syscons.c,v 1.54 1997/08/10 10:52:17 kato Exp $
|
||||
* $Id: syscons.c,v 1.55 1997/09/05 10:17:28 kato Exp $
|
||||
*/
|
||||
|
||||
#include "sc.h"
|
||||
@ -291,7 +291,7 @@ static d_mmap_t scmmap;
|
||||
static struct cdevsw scdevsw = {
|
||||
scopen, scclose, scread, scwrite,
|
||||
scioctl, nullstop, noreset, scdevtotty,
|
||||
ttselect, scmmap, nostrategy, "sc", NULL, -1 };
|
||||
ttpoll, scmmap, nostrategy, "sc", NULL, -1 };
|
||||
|
||||
#ifdef PC98
|
||||
static u_char ibmpc_to_pc98[16] =
|
||||
|
Loading…
x
Reference in New Issue
Block a user