soundmodule.h

来自「基于组件方式开发操作系统的OSKIT源代码」· C头文件 代码 · 共 32 行

H
32
字号
#ifndef _SOUNDMODULE_H#define _SOUNDMODULE_H#include <linux/notifier.h>extern struct notifier_block *sound_locker;extern void sound_notifier_chain_register(struct notifier_block *);#ifdef MODULE#define SOUND_LOCK		sound_notifier_chain_register(&sound_notifier); #define SOUND_LOCK_END		notifier_chain_unregister(&sound_locker, &sound_notifier)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

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?