summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/spigot.c
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>2001-09-12 08:38:13 +0000
committerjulian <julian@FreeBSD.org>2001-09-12 08:38:13 +0000
commit5596676e6c6c1e81e899cd0531f9b1c28a292669 (patch)
treeb1a19fcdf05759281fab0d89efb13f0fdf42102e /sys/i386/isa/spigot.c
parent83e00d4274950d2b531c24692cd123538ffbddb9 (diff)
downloadFreeBSD-src-5596676e6c6c1e81e899cd0531f9b1c28a292669.zip
FreeBSD-src-5596676e6c6c1e81e899cd0531f9b1c28a292669.tar.gz
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
Diffstat (limited to 'sys/i386/isa/spigot.c')
-rw-r--r--sys/i386/isa/spigot.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/i386/isa/spigot.c b/sys/i386/isa/spigot.c
index db4a926..0bd87ff 100644
--- a/sys/i386/isa/spigot.c
+++ b/sys/i386/isa/spigot.c
@@ -161,7 +161,7 @@ spigot_attach(struct isa_device *devp)
}
static int
-spigot_open(dev_t dev, int flags, int fmt, struct proc *p)
+spigot_open(dev_t dev, int flags, int fmt, struct thread *td)
{
int error;
struct spigot_softc *ss = (struct spigot_softc *)&spigot_softc[UNIT(dev)];
@@ -179,7 +179,7 @@ struct spigot_softc *ss = (struct spigot_softc *)&spigot_softc[UNIT(dev)];
* require sufficient privilege soon and nothing much can be done
* without them.
*/
- error = suser(p);
+ error = suser_td(td);
if (error != 0)
return error;
if (securelevel > 0)
@@ -194,7 +194,7 @@ struct spigot_softc *ss = (struct spigot_softc *)&spigot_softc[UNIT(dev)];
}
static int
-spigot_close(dev_t dev, int flags, int fmt, struct proc *p)
+spigot_close(dev_t dev, int flags, int fmt, struct thread *td)
{
struct spigot_softc *ss = (struct spigot_softc *)&spigot_softc[UNIT(dev)];
@@ -221,7 +221,7 @@ spigot_read(dev_t dev, struct uio *uio, int ioflag)
static int
-spigot_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
+spigot_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
{
int error;
struct spigot_softc *ss = (struct spigot_softc *)&spigot_softc[UNIT(dev)];
@@ -230,21 +230,21 @@ struct spigot_info *info;
if(!data) return(EINVAL);
switch(cmd){
case SPIGOT_SETINT:
- ss->p = p;
+ ss->p = td->td_proc;
ss->signal_num = *((int *)data);
break;
case SPIGOT_IOPL_ON: /* allow access to the IO PAGE */
#if !defined(SPIGOT_UNSECURE)
- error = suser(p);
+ error = suser_td(td);
if (error != 0)
return error;
if (securelevel > 0)
return EPERM;
#endif
- p->p_frame->tf_eflags |= PSL_IOPL;
+ td->td_frame->tf_eflags |= PSL_IOPL;
break;
case SPIGOT_IOPL_OFF: /* deny access to the IO PAGE */
- p->p_frame->tf_eflags &= ~PSL_IOPL;
+ td->td_frame->tf_eflags &= ~PSL_IOPL;
break;
case SPIGOT_GET_INFO:
info = (struct spigot_info *)data;
OpenPOWER on IntegriCloud