aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorCameron Grant <cg@FreeBSD.org>2001-03-05 15:49:42 +0000
committerCameron Grant <cg@FreeBSD.org>2001-03-05 15:49:42 +0000
commita983d575283750b025354d9788c458d347d071e0 (patch)
tree583a1f92d761979b06614060b8ee9cc3e463cfe4 /sys/dev
parent84d8ce8b7014a15f659c04380e67e4efacf5dbeb (diff)
Notes
Diffstat (limited to 'sys/dev')
-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 2f64105b705f..55aa7720933d 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
}