aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/sound/pcm/dsp.c
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/dev/sound/pcm/dsp.c
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/dev/sound/pcm/dsp.c')
-rw-r--r--sys/dev/sound/pcm/dsp.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c
index 6a4bfc698575..4ae4e6703225 100644
--- a/sys/dev/sound/pcm/dsp.c
+++ b/sys/dev/sound/pcm/dsp.c
@@ -169,7 +169,7 @@ relchns(dev_t dev, struct pcm_channel *rdch, struct pcm_channel *wrch, u_int32_t
}
static int
-dsp_open(dev_t i_dev, int flags, int mode, struct proc *p)
+dsp_open(dev_t i_dev, int flags, int mode, struct thread *td)
{
struct pcm_channel *rdch, *wrch;
struct snddev_info *d;
@@ -229,9 +229,9 @@ dsp_open(dev_t i_dev, int flags, int mode, struct proc *p)
if (rdch == NULL) {
/* not already open, try to get a channel */
if (devtype == SND_DEV_DSPREC)
- rdch = pcm_chnalloc(d, PCMDIR_REC, p->p_pid, PCMCHAN(i_dev));
+ rdch = pcm_chnalloc(d, PCMDIR_REC, td->td_proc->p_pid, PCMCHAN(i_dev));
else
- rdch = pcm_chnalloc(d, PCMDIR_REC, p->p_pid, -1);
+ rdch = pcm_chnalloc(d, PCMDIR_REC, td->td_proc->p_pid, -1);
if (!rdch) {
/* no channel available, exit */
pcm_unlock(d);
@@ -251,7 +251,7 @@ dsp_open(dev_t i_dev, int flags, int mode, struct proc *p)
/* open for write */
if (wrch == NULL) {
/* not already open, try to get a channel */
- wrch = pcm_chnalloc(d, PCMDIR_PLAY, p->p_pid, -1);
+ wrch = pcm_chnalloc(d, PCMDIR_PLAY, td->td_proc->p_pid, -1);
if (!wrch) {
/* no channel available */
if (rdch && (flags & FREAD)) {
@@ -310,7 +310,7 @@ dsp_open(dev_t i_dev, int flags, int mode, struct proc *p)
}
static int
-dsp_close(dev_t i_dev, int flags, int mode, struct proc *p)
+dsp_close(dev_t i_dev, int flags, int mode, struct thread *td)
{
struct pcm_channel *rdch, *wrch;
struct snddev_info *d;
@@ -429,7 +429,7 @@ dsp_write(dev_t i_dev, struct uio *buf, int flag)
}
static int
-dsp_ioctl(dev_t i_dev, u_long cmd, caddr_t arg, int mode, struct proc *p)
+dsp_ioctl(dev_t i_dev, u_long cmd, caddr_t arg, int mode, struct thread *td)
{
struct pcm_channel *wrch, *rdch;
struct snddev_info *d;
@@ -446,7 +446,7 @@ dsp_ioctl(dev_t i_dev, u_long cmd, caddr_t arg, int mode, struct proc *p)
dev_t pdev;
pdev = makedev(SND_CDEV_MAJOR, PCMMKMINOR(PCMUNIT(i_dev), SND_DEV_CTL, 0));
- return mixer_ioctl(pdev, cmd, arg, mode, p);
+ return mixer_ioctl(pdev, cmd, arg, mode, td);
}
s = spltty();
@@ -961,7 +961,7 @@ dsp_ioctl(dev_t i_dev, u_long cmd, caddr_t arg, int mode, struct proc *p)
}
static int
-dsp_poll(dev_t i_dev, int events, struct proc *p)
+dsp_poll(dev_t i_dev, int events, struct thread *td)
{
struct pcm_channel *wrch = NULL, *rdch = NULL;
intrmask_t s;
@@ -974,12 +974,12 @@ dsp_poll(dev_t i_dev, int events, struct proc *p)
if (wrch) {
e = (events & (POLLOUT | POLLWRNORM));
if (e)
- ret |= chn_poll(wrch, e, p);
+ ret |= chn_poll(wrch, e, td);
}
if (rdch) {
e = (events & (POLLIN | POLLRDNORM));
if (e)
- ret |= chn_poll(rdch, e, p);
+ ret |= chn_poll(rdch, e, td);
}
relchns(i_dev, rdch, wrch, SD_F_PRIO_RD | SD_F_PRIO_WR);