summaryrefslogtreecommitdiffstats
path: root/sys/pccard
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/pccard
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/pccard')
-rw-r--r--sys/pccard/pccard.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/pccard/pccard.c b/sys/pccard/pccard.c
index 0a02e02..f98bf0a 100644
--- a/sys/pccard/pccard.c
+++ b/sys/pccard/pccard.c
@@ -330,7 +330,7 @@ pccard_event(struct slot *slt, enum card_event event)
* Device driver interface.
*/
static int
-crdopen(dev_t dev, int oflags, int devtype, struct proc *p)
+crdopen(dev_t dev, int oflags, int devtype, struct thread *td)
{
struct slot *slt = PCCARD_DEV2SOFTC(dev);
@@ -346,7 +346,7 @@ crdopen(dev_t dev, int oflags, int devtype, struct proc *p)
* slots may be assigned to drivers already.
*/
static int
-crdclose(dev_t dev, int fflag, int devtype, struct proc *p)
+crdclose(dev_t dev, int fflag, int devtype, struct thread *td)
{
return (0);
}
@@ -447,7 +447,7 @@ crdwrite(dev_t dev, struct uio *uio, int ioflag)
* descriptors, and assignment of drivers.
*/
static int
-crdioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct proc *p)
+crdioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct thread *td)
{
u_int32_t addr;
int err;
@@ -497,7 +497,7 @@ crdioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct proc *p)
* At the very least, we only allow root to set the context.
*/
case PIOCSMEM:
- if (suser(p))
+ if (suser_td(td))
return (EPERM);
if (slt->state != filled)
return (ENXIO);
@@ -522,7 +522,7 @@ crdioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct proc *p)
* Set I/O port context.
*/
case PIOCSIO:
- if (suser(p))
+ if (suser_td(td))
return (EPERM);
if (slt->state != filled)
return (ENXIO);
@@ -548,7 +548,7 @@ crdioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct proc *p)
*(unsigned long *)data = pccard_mem;
break;
}
- if (suser(p))
+ if (suser_td(td))
return (EPERM);
/*
* Validate the memory by checking it against the I/O
@@ -580,7 +580,7 @@ crdioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct proc *p)
* Allocate a driver to this slot.
*/
case PIOCSDRV:
- if (suser(p))
+ if (suser_td(td))
return (EPERM);
err = allocate_driver(slt, (struct dev_desc *)data);
if (!err)
@@ -617,7 +617,7 @@ crdioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct proc *p)
* when a change in card status occurs.
*/
static int
-crdpoll(dev_t dev, int events, struct proc *p)
+crdpoll(dev_t dev, int events, struct thread *td)
{
int revents = 0;
int s;
@@ -638,7 +638,7 @@ crdpoll(dev_t dev, int events, struct proc *p)
revents |= POLLRDBAND;
if (revents == 0)
- selrecord(p, &slt->selp);
+ selrecord(td, &slt->selp);
splx(s);
return (revents);
OpenPOWER on IntegriCloud