summaryrefslogtreecommitdiffstats
path: root/sys/i4b
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/i4b
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/i4b')
-rw-r--r--sys/i4b/driver/i4b_ctl.c20
-rw-r--r--sys/i4b/driver/i4b_rbch.c22
-rw-r--r--sys/i4b/driver/i4b_tel.c34
-rw-r--r--sys/i4b/driver/i4b_trace.c20
-rw-r--r--sys/i4b/layer4/i4b_i4bdrv.c30
5 files changed, 63 insertions, 63 deletions
diff --git a/sys/i4b/driver/i4b_ctl.c b/sys/i4b/driver/i4b_ctl.c
index b30f792..d74fa7e 100644
--- a/sys/i4b/driver/i4b_ctl.c
+++ b/sys/i4b/driver/i4b_ctl.c
@@ -141,12 +141,12 @@ static void *devfs_token;
#ifndef __FreeBSD__
#define PDEVSTATIC /* */
void i4bctlattach __P((void));
-int i4bctlopen __P((dev_t dev, int flag, int fmt, struct proc *p));
-int i4bctlclose __P((dev_t dev, int flag, int fmt, struct proc *p));
+int i4bctlopen __P((dev_t dev, int flag, int fmt, struct thread *td));
+int i4bctlclose __P((dev_t dev, int flag, int fmt, struct thread *td));
#ifdef __bsdi__
-int i4bctlioctl __P((dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p));
+int i4bctlioctl __P((dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td));
#else
-int i4bctlioctl __P((dev_t dev, int cmd, caddr_t data, int flag, struct proc *p));
+int i4bctlioctl __P((dev_t dev, int cmd, caddr_t data, int flag, struct thread *td));
#endif
#endif /* !FreeBSD */
@@ -230,7 +230,7 @@ i4bctlattach()
* i4bctlopen - device driver open routine
*---------------------------------------------------------------------------*/
PDEVSTATIC int
-i4bctlopen(dev_t dev, int flag, int fmt, struct proc *p)
+i4bctlopen(dev_t dev, int flag, int fmt, struct thread *td)
{
if(minor(dev))
return (ENXIO);
@@ -247,7 +247,7 @@ i4bctlopen(dev_t dev, int flag, int fmt, struct proc *p)
* i4bctlclose - device driver close routine
*---------------------------------------------------------------------------*/
PDEVSTATIC int
-i4bctlclose(dev_t dev, int flag, int fmt, struct proc *p)
+i4bctlclose(dev_t dev, int flag, int fmt, struct thread *td)
{
openflag = 0;
return (0);
@@ -258,11 +258,11 @@ i4bctlclose(dev_t dev, int flag, int fmt, struct proc *p)
*---------------------------------------------------------------------------*/
PDEVSTATIC int
#if defined (__FreeBSD_version) && __FreeBSD_version >= 300003
-i4bctlioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
+i4bctlioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
#elif defined(__bsdi__)
-i4bctlioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
+i4bctlioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
#else
-i4bctlioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
+i4bctlioctl(dev_t dev, int cmd, caddr_t data, int flag, struct thread *td)
#endif
{
#if DO_I4B_DEBUG
@@ -360,7 +360,7 @@ i4bctlioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
* i4bctlpoll - device driver poll routine
*---------------------------------------------------------------------------*/
static int
-i4bctlpoll (dev_t dev, int events, struct proc *p)
+i4bctlpoll (dev_t dev, int events, struct thread *td)
{
return (ENODEV);
}
diff --git a/sys/i4b/driver/i4b_rbch.c b/sys/i4b/driver/i4b_rbch.c
index 1475428..29dce82 100644
--- a/sys/i4b/driver/i4b_rbch.c
+++ b/sys/i4b/driver/i4b_rbch.c
@@ -157,15 +157,15 @@ static void rbch_clrq(int unit);
#define PDEVSTATIC /* - not static - */
#define IOCTL_CMD_T u_long
void i4brbchattach __P((void));
-int i4brbchopen __P((dev_t dev, int flag, int fmt, struct proc *p));
-int i4brbchclose __P((dev_t dev, int flag, int fmt, struct proc *p));
+int i4brbchopen __P((dev_t dev, int flag, int fmt, struct thread *td));
+int i4brbchclose __P((dev_t dev, int flag, int fmt, struct thread *td));
int i4brbchread __P((dev_t dev, struct uio *uio, int ioflag));
int i4brbchwrite __P((dev_t dev, struct uio *uio, int ioflag));
-int i4brbchioctl __P((dev_t dev, IOCTL_CMD_T cmd, caddr_t arg, int flag, struct proc* pr));
+int i4brbchioctl __P((dev_t dev, IOCTL_CMD_T cmd, caddr_t arg, int flag, struct thread *td));
#ifdef OS_USES_POLL
-int i4brbchpoll __P((dev_t dev, int events, struct proc *p));
+int i4brbchpoll __P((dev_t dev, int events, struct thread *td));
#else
-PDEVSTATIC int i4brbchselect __P((dev_t dev, int rw, struct proc *p));
+PDEVSTATIC int i4brbchselect __P((dev_t dev, int rw, struct thread *td));
#endif
#endif
@@ -303,7 +303,7 @@ i4brbchattach()
* open rbch device
*---------------------------------------------------------------------------*/
PDEVSTATIC int
-i4brbchopen(dev_t dev, int flag, int fmt, struct proc *p)
+i4brbchopen(dev_t dev, int flag, int fmt, struct thread *td)
{
int unit = minor(dev);
@@ -328,7 +328,7 @@ i4brbchopen(dev_t dev, int flag, int fmt, struct proc *p)
* close rbch device
*---------------------------------------------------------------------------*/
PDEVSTATIC int
-i4brbchclose(dev_t dev, int flag, int fmt, struct proc *p)
+i4brbchclose(dev_t dev, int flag, int fmt, struct thread *td)
{
int unit = minor(dev);
struct rbch_softc *sc = &rbch_softc[unit];
@@ -575,7 +575,7 @@ i4brbchwrite(dev_t dev, struct uio * uio, int ioflag)
* rbch device ioctl handlibg
*---------------------------------------------------------------------------*/
PDEVSTATIC int
-i4brbchioctl(dev_t dev, IOCTL_CMD_T cmd, caddr_t data, int flag, struct proc *p)
+i4brbchioctl(dev_t dev, IOCTL_CMD_T cmd, caddr_t data, int flag, struct thread *td)
{
int error = 0;
int unit = minor(dev);
@@ -674,7 +674,7 @@ i4brbchioctl(dev_t dev, IOCTL_CMD_T cmd, caddr_t data, int flag, struct proc *p)
* device driver poll
*---------------------------------------------------------------------------*/
PDEVSTATIC int
-i4brbchpoll(dev_t dev, int events, struct proc *p)
+i4brbchpoll(dev_t dev, int events, struct thread *td)
{
int revents = 0; /* Events we found */
int s;
@@ -720,7 +720,7 @@ i4brbchpoll(dev_t dev, int events, struct proc *p)
}
if(revents == 0)
- selrecord(p, &sc->selp);
+ selrecord(td, &sc->selp);
splx(s);
return(revents);
@@ -732,7 +732,7 @@ i4brbchpoll(dev_t dev, int events, struct proc *p)
* device driver select
*---------------------------------------------------------------------------*/
PDEVSTATIC int
-i4brbchselect(dev_t dev, int rw, struct proc *p)
+i4brbchselect(dev_t dev, int rw, struct thread *td)
{
int unit = minor(dev);
struct rbch_softc *sc = &rbch_softc[unit];
diff --git a/sys/i4b/driver/i4b_tel.c b/sys/i4b/driver/i4b_tel.c
index 2b6115b..c9a195d 100644
--- a/sys/i4b/driver/i4b_tel.c
+++ b/sys/i4b/driver/i4b_tel.c
@@ -156,20 +156,20 @@ static u_char sinetab[];
PDEVSTATIC void i4btelattach __P((void));
#ifdef __bsdi__
-PDEVSTATIC int i4btelioctl __P((dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p));
+PDEVSTATIC int i4btelioctl __P((dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td));
#else
-PDEVSTATIC int i4btelioctl __P((dev_t dev, int cmd, caddr_t data, int flag, struct proc *p));
+PDEVSTATIC int i4btelioctl __P((dev_t dev, int cmd, caddr_t data, int flag, struct thread *td));
#endif
-int i4btelopen __P((dev_t dev, int flag, int fmt, struct proc *p));
-int i4btelclose __P((dev_t dev, int flag, int fmt, struct proc *p));
+int i4btelopen __P((dev_t dev, int flag, int fmt, struct thread *td));
+int i4btelclose __P((dev_t dev, int flag, int fmt, struct thread *td));
int i4btelread __P((dev_t dev, struct uio *uio, int ioflag));
int i4btelwrite __P((dev_t dev, struct uio * uio, int ioflag));
#ifdef OS_USES_POLL
-int i4btelpoll __P((dev_t dev, int events, struct proc *p));
+int i4btelpoll __P((dev_t dev, int events, struct thread *td));
#else
-int i4btelsel __P((dev_t dev, int rw, struct proc *p));
+int i4btelsel __P((dev_t dev, int rw, struct thread *td));
#endif
#endif /* ! __FreeBSD__ */
@@ -234,7 +234,7 @@ SYSINIT(i4bteldev, SI_SUB_DRIVERS,
#ifdef __bsdi__
-int i4btelsel(dev_t dev, int rw, struct proc *p);
+int i4btelsel(dev_t dev, int rw, struct thread *td);
int i4btelmatch(struct device *parent, struct cfdata *cf, void *aux);
void dummy_i4btelattach(struct device*, struct device *, void *);
@@ -314,7 +314,7 @@ i4btelattach()
* open tel device
*---------------------------------------------------------------------------*/
PDEVSTATIC int
-i4btelopen(dev_t dev, int flag, int fmt, struct proc *p)
+i4btelopen(dev_t dev, int flag, int fmt, struct thread *td)
{
int unit = UNIT(dev);
int func = FUNC(dev);
@@ -343,7 +343,7 @@ i4btelopen(dev_t dev, int flag, int fmt, struct proc *p)
* close tel device
*---------------------------------------------------------------------------*/
PDEVSTATIC int
-i4btelclose(dev_t dev, int flag, int fmt, struct proc *p)
+i4btelclose(dev_t dev, int flag, int fmt, struct thread *td)
{
int unit = UNIT(dev);
int func = FUNC(dev);
@@ -387,11 +387,11 @@ i4btelclose(dev_t dev, int flag, int fmt, struct proc *p)
*---------------------------------------------------------------------------*/
PDEVSTATIC int
#if defined(__FreeBSD__)
-i4btelioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
+i4btelioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
#elif defined(__bsdi__)
-i4btelioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
+i4btelioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
#else
-i4btelioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
+i4btelioctl(dev_t dev, int cmd, caddr_t data, int flag, struct thread *td)
#endif
{
int unit = UNIT(dev);
@@ -815,7 +815,7 @@ tel_tone(tel_sc_t *sc)
* device driver poll
*---------------------------------------------------------------------------*/
PDEVSTATIC int
-i4btelpoll(dev_t dev, int events, struct proc *p)
+i4btelpoll(dev_t dev, int events, struct thread *td)
{
int revents = 0; /* Events we found */
int s;
@@ -863,7 +863,7 @@ i4btelpoll(dev_t dev, int events, struct proc *p)
if(revents == 0)
{
NDBGL4(L4_TELDBG, "i4btel%d, selrecord", unit);
- selrecord(p, &sc->selp);
+ selrecord(td, &sc->selp);
}
}
else if(func == FUNCDIAL)
@@ -884,7 +884,7 @@ i4btelpoll(dev_t dev, int events, struct proc *p)
if(revents == 0)
{
NDBGL4(L4_TELDBG, "i4bteld%d, selrecord", unit);
- selrecord(p, &sc->selp);
+ selrecord(td, &sc->selp);
}
}
splx(s);
@@ -897,7 +897,7 @@ i4btelpoll(dev_t dev, int events, struct proc *p)
* device driver select
*---------------------------------------------------------------------------*/
PDEVSTATIC int
-i4btelsel(dev_t dev, int rw, struct proc *p)
+i4btelsel(dev_t dev, int rw, struct thread *td)
{
int s;
int unit = UNIT(dev);
@@ -963,7 +963,7 @@ i4btelsel(dev_t dev, int rw, struct proc *p)
}
NDBGL4(L4_TELDBG, "i4bteld%d, selrecord", unit);
- selrecord(p, &sc->selp);
+ selrecord(td, &sc->selp);
splx(s);
return 0;
}
diff --git a/sys/i4b/driver/i4b_trace.c b/sys/i4b/driver/i4b_trace.c
index a9ad351..4a95094 100644
--- a/sys/i4b/driver/i4b_trace.c
+++ b/sys/i4b/driver/i4b_trace.c
@@ -101,14 +101,14 @@ static int outunit = -1;
#define PDEVSTATIC /* - not static - */
void i4btrcattach __P((void));
-int i4btrcopen __P((dev_t dev, int flag, int fmt, struct proc *p));
-int i4btrcclose __P((dev_t dev, int flag, int fmt, struct proc *p));
+int i4btrcopen __P((dev_t dev, int flag, int fmt, struct thread *td));
+int i4btrcclose __P((dev_t dev, int flag, int fmt, struct thread *td));
int i4btrcread __P((dev_t dev, struct uio * uio, int ioflag));
#ifdef __bsdi__
-int i4btrcioctl __P((dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p));
+int i4btrcioctl __P((dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td));
#else
-int i4btrcioctl __P((dev_t dev, int cmd, caddr_t data, int flag, struct proc *p));
+int i4btrcioctl __P((dev_t dev, int cmd, caddr_t data, int flag, struct thread *td));
#endif
#endif
@@ -333,7 +333,7 @@ get_trace_data_from_l1(i4b_trace_hdr_t *hdr, int len, char *buf)
* open trace device
*---------------------------------------------------------------------------*/
PDEVSTATIC int
-i4btrcopen(dev_t dev, int flag, int fmt, struct proc *p)
+i4btrcopen(dev_t dev, int flag, int fmt, struct thread *td)
{
int x;
int unit = minor(dev);
@@ -360,7 +360,7 @@ i4btrcopen(dev_t dev, int flag, int fmt, struct proc *p)
* close trace device
*---------------------------------------------------------------------------*/
PDEVSTATIC int
-i4btrcclose(dev_t dev, int flag, int fmt, struct proc *p)
+i4btrcclose(dev_t dev, int flag, int fmt, struct thread *td)
{
int unit = minor(dev);
int i, x;
@@ -462,7 +462,7 @@ i4btrcread(dev_t dev, struct uio * uio, int ioflag)
* poll device
*---------------------------------------------------------------------------*/
PDEVSTATIC int
-i4btrcpoll(dev_t dev, int events, struct proc *p)
+i4btrcpoll(dev_t dev, int events, struct thread *td)
{
return(ENODEV);
}
@@ -473,11 +473,11 @@ i4btrcpoll(dev_t dev, int events, struct proc *p)
*---------------------------------------------------------------------------*/
PDEVSTATIC int
#if defined (__FreeBSD_version) && __FreeBSD_version >= 300003
-i4btrcioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
+i4btrcioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
#elif defined(__bsdi__)
-i4btrcioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
+i4btrcioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
#else
-i4btrcioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
+i4btrcioctl(dev_t dev, int cmd, caddr_t data, int flag, struct thread *td)
#endif
{
int error = 0;
diff --git a/sys/i4b/layer4/i4b_i4bdrv.c b/sys/i4b/layer4/i4b_i4bdrv.c
index f26adf8..f5f3224 100644
--- a/sys/i4b/layer4/i4b_i4bdrv.c
+++ b/sys/i4b/layer4/i4b_i4bdrv.c
@@ -132,20 +132,20 @@ static void *devfs_token;
#define PDEVSTATIC /* - not static - */
PDEVSTATIC void i4battach __P((void));
-PDEVSTATIC int i4bopen __P((dev_t dev, int flag, int fmt, struct proc *p));
-PDEVSTATIC int i4bclose __P((dev_t dev, int flag, int fmt, struct proc *p));
+PDEVSTATIC int i4bopen __P((dev_t dev, int flag, int fmt, struct thread *td));
+PDEVSTATIC int i4bclose __P((dev_t dev, int flag, int fmt, struct thread *td));
PDEVSTATIC int i4bread __P((dev_t dev, struct uio *uio, int ioflag));
#ifdef __bsdi__
-PDEVSTATIC int i4bioctl __P((dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p));
+PDEVSTATIC int i4bioctl __P((dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td));
#else
-PDEVSTATIC int i4bioctl __P((dev_t dev, int cmd, caddr_t data, int flag, struct proc *p));
+PDEVSTATIC int i4bioctl __P((dev_t dev, int cmd, caddr_t data, int flag, struct thread *td));
#endif
#ifdef OS_USES_POLL
-PDEVSTATIC int i4bpoll __P((dev_t dev, int events, struct proc *p));
+PDEVSTATIC int i4bpoll __P((dev_t dev, int events, struct thread *td));
#else
-PDEVSTATIC int i4bselect __P((dev_t dev, int rw, struct proc *p));
+PDEVSTATIC int i4bselect __P((dev_t dev, int rw, struct thread *td));
#endif
#endif /* #ifndef __FreeBSD__ */
@@ -275,7 +275,7 @@ i4battach()
* i4bopen - device driver open routine
*---------------------------------------------------------------------------*/
PDEVSTATIC int
-i4bopen(dev_t dev, int flag, int fmt, struct proc *p)
+i4bopen(dev_t dev, int flag, int fmt, struct thread *td)
{
int x;
@@ -297,7 +297,7 @@ i4bopen(dev_t dev, int flag, int fmt, struct proc *p)
* i4bclose - device driver close routine
*---------------------------------------------------------------------------*/
PDEVSTATIC int
-i4bclose(dev_t dev, int flag, int fmt, struct proc *p)
+i4bclose(dev_t dev, int flag, int fmt, struct thread *td)
{
int x = splimp();
openflag = 0;
@@ -360,11 +360,11 @@ i4bread(dev_t dev, struct uio *uio, int ioflag)
*---------------------------------------------------------------------------*/
PDEVSTATIC int
#if defined (__FreeBSD_version) && __FreeBSD_version >= 300003
-i4bioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
+i4bioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
#elif defined(__bsdi__)
-i4bioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
+i4bioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
#else
-i4bioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
+i4bioctl(dev_t dev, int cmd, caddr_t data, int flag, struct thread *td)
#endif
{
call_desc_t *cd;
@@ -920,7 +920,7 @@ diag_done:
* i4bselect - device driver select routine
*---------------------------------------------------------------------------*/
PDEVSTATIC int
-i4bselect(dev_t dev, int rw, struct proc *p)
+i4bselect(dev_t dev, int rw, struct thread *td)
{
int x;
@@ -933,7 +933,7 @@ i4bselect(dev_t dev, int rw, struct proc *p)
if(!IF_QEMPTY(&i4b_rdqueue))
return(1);
x = splimp();
- selrecord(p, &select_rd_info);
+ selrecord(td, &select_rd_info);
selflag = 1;
splx(x);
return(0);
@@ -952,7 +952,7 @@ i4bselect(dev_t dev, int rw, struct proc *p)
* i4bpoll - device driver poll routine
*---------------------------------------------------------------------------*/
PDEVSTATIC int
-i4bpoll(dev_t dev, int events, struct proc *p)
+i4bpoll(dev_t dev, int events, struct thread *td)
{
int x;
@@ -965,7 +965,7 @@ i4bpoll(dev_t dev, int events, struct proc *p)
return(1);
x = splimp();
- selrecord(p, &select_rd_info);
+ selrecord(td, &select_rd_info);
selflag = 1;
splx(x);
return(0);
OpenPOWER on IntegriCloud