From a983d575283750b025354d9788c458d347d071e0 Mon Sep 17 00:00:00 2001 From: Cameron Grant Date: Mon, 5 Mar 2001 15:49:42 +0000 Subject: [PATCH] nuke the splstack stuff, snd_mtx* will now be no-ops on 4.x --- sys/dev/sound/pcm/sound.c | 30 +----------------------------- 1 file changed, 1 insertion(+), 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 }