aboutsummaryrefslogtreecommitdiff
path: root/sys/isa
diff options
context:
space:
mode:
authorJulian Elischer <julian@FreeBSD.org>2001-09-12 08:38:13 +0000
committerJulian Elischer <julian@FreeBSD.org>2001-09-12 08:38:13 +0000
commitb40ce4165d5eb3a5de1515245055350ae3dbab8e (patch)
treeb1a19fcdf05759281fab0d89efb13f0fdf42102e /sys/isa
parent9b36a30ee46a7766f269fe832ef3a2daa2ec04f0 (diff)
downloadsrc-b40ce4165d5eb3a5de1515245055350ae3dbab8e.tar.gz
src-b40ce4165d5eb3a5de1515245055350ae3dbab8e.zip
KSE Milestone 2
Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
Notes
Notes: svn path=/head/; revision=83366
Diffstat (limited to 'sys/isa')
-rw-r--r--sys/isa/fd.c10
-rw-r--r--sys/isa/joy.c6
-rw-r--r--sys/isa/psm.c10
-rw-r--r--sys/isa/sio.c20
-rw-r--r--sys/isa/vga_isa.c12
5 files changed, 29 insertions, 29 deletions
diff --git a/sys/isa/fd.c b/sys/isa/fd.c
index f896b3356cb5..845f5204a387 100644
--- a/sys/isa/fd.c
+++ b/sys/isa/fd.c
@@ -1519,7 +1519,7 @@ out_fdc(struct fdc_data *fdc, int x)
* auxiliary functions).
*/
int
-Fdopen(dev_t dev, int flags, int mode, struct proc *p)
+Fdopen(dev_t dev, int flags, int mode, struct thread *td)
{
fdu_t fdu = FDUNIT(minor(dev));
int type = FDTYPE(minor(dev));
@@ -1614,7 +1614,7 @@ Fdopen(dev_t dev, int flags, int mode, struct proc *p)
}
int
-fdclose(dev_t dev, int flags, int mode, struct proc *p)
+fdclose(dev_t dev, int flags, int mode, struct thread *td)
{
fdu_t fdu = FDUNIT(minor(dev));
struct fd_data *fd;
@@ -2473,7 +2473,7 @@ fdmisccmd(dev_t dev, u_int cmd, void *data)
}
static int
-fdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p)
+fdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
{
fdu_t fdu;
fd_p fd;
@@ -2545,7 +2545,7 @@ fdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p)
case FD_STYPE: /* set drive type */
/* this is considered harmful; only allow for superuser */
- if (suser(p) != 0)
+ if (suser_td(td) != 0)
return (EPERM);
*fd->ft = *(struct fd_type *)addr;
break;
@@ -2569,7 +2569,7 @@ fdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p)
#endif
case FD_CLRERR:
- if (suser(p) != 0)
+ if (suser_td(td) != 0)
return (EPERM);
fd->fdc->fdc_errs = 0;
break;
diff --git a/sys/isa/joy.c b/sys/isa/joy.c
index beda4de73609..0f3f11d36117 100644
--- a/sys/isa/joy.c
+++ b/sys/isa/joy.c
@@ -159,7 +159,7 @@ DRIVER_MODULE(joy, isa, joy_isa_driver, joy_devclass, 0, 0);
DRIVER_MODULE(joy, acpi, joy_isa_driver, joy_devclass, 0, 0);
static int
-joyopen(dev_t dev, int flags, int fmt, struct proc *p)
+joyopen(dev_t dev, int flags, int fmt, struct thread *td)
{
int i = joypart (dev);
struct joy_softc *joy = JOY_SOFTC(UNIT(dev));
@@ -172,7 +172,7 @@ joyopen(dev_t dev, int flags, int fmt, struct proc *p)
}
static int
-joyclose(dev_t dev, int flags, int fmt, struct proc *p)
+joyclose(dev_t dev, int flags, int fmt, struct thread *td)
{
int i = joypart (dev);
struct joy_softc *joy = JOY_SOFTC(UNIT(dev));
@@ -240,7 +240,7 @@ joyread(dev_t dev, struct uio *uio, int flag)
}
static int
-joyioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
+joyioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
{
struct joy_softc *joy = JOY_SOFTC(UNIT(dev));
int i = joypart (dev);
diff --git a/sys/isa/psm.c b/sys/isa/psm.c
index 1bb5b7171519..1fb37ea3457e 100644
--- a/sys/isa/psm.c
+++ b/sys/isa/psm.c
@@ -1164,7 +1164,7 @@ psmdetach(device_t dev)
}
static int
-psmopen(dev_t dev, int flag, int fmt, struct proc *p)
+psmopen(dev_t dev, int flag, int fmt, struct thread *td)
{
int unit = PSM_UNIT(dev);
struct psm_softc *sc;
@@ -1248,7 +1248,7 @@ psmopen(dev_t dev, int flag, int fmt, struct proc *p)
}
static int
-psmclose(dev_t dev, int flag, int fmt, struct proc *p)
+psmclose(dev_t dev, int flag, int fmt, struct thread *td)
{
int unit = PSM_UNIT(dev);
struct psm_softc *sc = PSM_SOFTC(unit);
@@ -1516,7 +1516,7 @@ unblock_mouse_data(struct psm_softc *sc, int c)
}
static int
-psmioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p)
+psmioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
{
struct psm_softc *sc = PSM_SOFTC(PSM_UNIT(dev));
mousemode_t mode;
@@ -2237,7 +2237,7 @@ psmintr(void *arg)
}
static int
-psmpoll(dev_t dev, int events, struct proc *p)
+psmpoll(dev_t dev, int events, struct thread *td)
{
struct psm_softc *sc = PSM_SOFTC(PSM_UNIT(dev));
int s;
@@ -2249,7 +2249,7 @@ psmpoll(dev_t dev, int events, struct proc *p)
if (sc->queue.count > 0)
revents |= events & (POLLIN | POLLRDNORM);
else
- selrecord(p, &sc->rsel);
+ selrecord(td, &sc->rsel);
}
splx(s);
diff --git a/sys/isa/sio.c b/sys/isa/sio.c
index 3c68d7c88401..05d8f358b27e 100644
--- a/sys/isa/sio.c
+++ b/sys/isa/sio.c
@@ -1378,11 +1378,11 @@ determined_type: ;
}
static int
-sioopen(dev, flag, mode, p)
+sioopen(dev, flag, mode, td)
dev_t dev;
int flag;
int mode;
- struct proc *p;
+ struct thread *td;
{
struct com_s *com;
int error;
@@ -1440,7 +1440,7 @@ open_top:
}
}
if (tp->t_state & TS_XCLUDE &&
- suser(p)) {
+ suser_td(td)) {
error = EBUSY;
goto out;
}
@@ -1560,11 +1560,11 @@ out:
}
static int
-sioclose(dev, flag, mode, p)
+sioclose(dev, flag, mode, td)
dev_t dev;
int flag;
int mode;
- struct proc *p;
+ struct thread *td;
{
struct com_s *com;
int mynor;
@@ -2114,12 +2114,12 @@ cont:
}
static int
-sioioctl(dev, cmd, data, flag, p)
+sioioctl(dev, cmd, data, flag, td)
dev_t dev;
u_long cmd;
caddr_t data;
int flag;
- struct proc *p;
+ struct thread *td;
{
struct com_s *com;
int error;
@@ -2150,7 +2150,7 @@ sioioctl(dev, cmd, data, flag, p)
}
switch (cmd) {
case TIOCSETA:
- error = suser(p);
+ error = suser_td(td);
if (error != 0)
return (error);
*ct = *(struct termios *)data;
@@ -2200,7 +2200,7 @@ sioioctl(dev, cmd, data, flag, p)
if (lt->c_ospeed != 0)
dt->c_ospeed = tp->t_ospeed;
}
- error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
+ error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, td);
if (error != ENOIOCTL)
return (error);
s = spltty();
@@ -2241,7 +2241,7 @@ sioioctl(dev, cmd, data, flag, p)
break;
case TIOCMSDTRWAIT:
/* must be root since the wait applies to following logins */
- error = suser(p);
+ error = suser_td(td);
if (error != 0) {
splx(s);
return (error);
diff --git a/sys/isa/vga_isa.c b/sys/isa/vga_isa.c
index 0cc754a72882..101dc5555587 100644
--- a/sys/isa/vga_isa.c
+++ b/sys/isa/vga_isa.c
@@ -166,15 +166,15 @@ isavga_attach(device_t dev)
#ifdef FB_INSTALL_CDEV
static int
-isavga_open(dev_t dev, int flag, int mode, struct proc *p)
+isavga_open(dev_t dev, int flag, int mode, struct thread *td)
{
- return vga_open(dev, VGA_SOFTC(VGA_UNIT(dev)), flag, mode, p);
+ return vga_open(dev, VGA_SOFTC(VGA_UNIT(dev)), flag, mode, td);
}
static int
-isavga_close(dev_t dev, int flag, int mode, struct proc *p)
+isavga_close(dev_t dev, int flag, int mode, struct thread *td)
{
- return vga_close(dev, VGA_SOFTC(VGA_UNIT(dev)), flag, mode, p);
+ return vga_close(dev, VGA_SOFTC(VGA_UNIT(dev)), flag, mode, td);
}
static int
@@ -190,9 +190,9 @@ isavga_write(dev_t dev, struct uio *uio, int flag)
}
static int
-isavga_ioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct proc *p)
+isavga_ioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct thread *td)
{
- return vga_ioctl(dev, VGA_SOFTC(VGA_UNIT(dev)), cmd, arg, flag, p);
+ return vga_ioctl(dev, VGA_SOFTC(VGA_UNIT(dev)), cmd, arg, flag, td);
}
static int