patch-2.1.67 linux/drivers/sound/soundmodule.h
Next file: linux/drivers/sound/sscape.c
Previous file: linux/drivers/sound/soundcard.c
Back to the patch index
Back to the overall index
-  Lines: 42
-  Date:
Sat Nov 29 10:33:21 1997
-  Orig file: 
v2.1.66/linux/drivers/sound/soundmodule.h
-  Orig date: 
Wed Dec 31 16:00:00 1969
diff -u --recursive --new-file v2.1.66/linux/drivers/sound/soundmodule.h linux/drivers/sound/soundmodule.h
@@ -0,0 +1,41 @@
+#ifndef _SOUNDMODULE_H
+#define _SOUNDMODULE_H
+
+#ifdef MODULE
+
+#include <linux/notifier.h>
+
+#ifdef SOUND_CORE
+
+struct notifier_block *sound_locker=(struct notifier_block *)0;
+
+#define SOUND_INC_USE_COUNT	notifier_call_chain(&sound_locker, 1, 0)
+#define SOUND_DEC_USE_COUNT	notifier_call_chain(&sound_locker, 0, 0)
+
+#else
+
+#define SOUND_LOCK		notifier_chain_register(&sound_locker, &sound_notifier)
+#define SOUND_LOCK_END		notifier_chain_unregister(&sound_locker, &sound_notifier)
+
+extern struct notifier_block *sound_locker;
+
+
+static int my_notifier_call(struct notifier_block *b, unsigned long foo, void *bar)
+{
+	if(foo)
+		MOD_INC_USE_COUNT;
+	else
+		MOD_DEC_USE_COUNT;
+	return NOTIFY_DONE;
+}
+
+static struct notifier_block sound_notifier=
+{
+	my_notifier_call,
+	(void *)0,
+	0
+};
+
+#endif
+#endif
+#endif
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov