summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcg <cg@FreeBSD.org>2001-03-05 15:49:42 +0000
committercg <cg@FreeBSD.org>2001-03-05 15:49:42 +0000
commit074032460a0f65e018d8fb5aacc9ced98ce1f91f (patch)
treecf8f9f5ab2c0f022fc7f81577d2427105af0dab0
parentcc0c5115b3504ffe77a244c85372d10f1e0ba207 (diff)
downloadFreeBSD-src-074032460a0f65e018d8fb5aacc9ced98ce1f91f.zip
FreeBSD-src-074032460a0f65e018d8fb5aacc9ced98ce1f91f.tar.gz
nuke the splstack stuff, snd_mtx* will now be no-ops on 4.x
-rw-r--r--sys/dev/sound/pcm/sound.c30
1 files changed, 1 insertions, 29 deletions
diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c
index 2f64105..55aa772 100644
--- a/sys/dev/sound/pcm/sound.c
+++ b/sys/dev/sound/pcm/sound.c
@@ -95,14 +95,6 @@ TUNABLE_INT_DECL("hw.snd.unit", 0, snd_unit);
SYSCTL_NODE(_hw, OID_AUTO, snd, CTLFLAG_RD, 0, "Sound driver");
-#ifndef USING_MUTEX
-#define SPLSTACK_MAX 32
-struct splstack {
- int depth;
- u_int32_t stack[SPLSTACK_MAX];
-};
-#endif
-
void *
snd_mtxcreate(const char *desc)
{
@@ -115,11 +107,7 @@ snd_mtxcreate(const char *desc)
mtx_init(m, desc, MTX_RECURSE);
return m;
#else
- struct splstack *s;
-
- s = malloc(sizeof(*s), M_DEVBUF, M_WAITOK | M_ZERO);
- s->depth = 0;
- return s;
+ return (void *)0xcafebabe;
#endif
}
@@ -132,10 +120,6 @@ snd_mtxfree(void *m)
mtx_assert(mtx, MA_OWNED);
mtx_destroy(mtx);
free(mtx, M_DEVBUF);
-#else
- struct splstack *s = m;
-
- free(s, M_DEVBUF);
#endif
}
@@ -146,8 +130,6 @@ snd_mtxassert(void *m)
struct mtx *mtx = m;
mtx_assert(mtx, MA_OWNED);
-#else
- KASSERT(((struct splstack *)s)->depth > 0, ("splstack depth <= 0"));
#endif
}
@@ -158,11 +140,6 @@ snd_mtxlock(void *m)
struct mtx *mtx = m;
mtx_lock(mtx);
-#else
- struct splstack *s = m;
-
- KASSERT((s->depth >= 0) && (s->depth < SPLSTACK_MAX), ("bad depth %d", s->depth));
- s->stack[s->depth++] = spltty();
#endif
}
@@ -173,11 +150,6 @@ snd_mtxunlock(void *m)
struct mtx *mtx = m;
mtx_unlock(mtx);
-#else
- struct splstack *s = m;
-
- KASSERT((s->depth >= 1) && (s->depth < SPLSTACK_MAX), ("bad depth %d", s->depth));
- splx(s->stack[s->depth--]);
#endif
}
OpenPOWER on IntegriCloud