当前位置: 首页 > 图灵资讯 > 技术篇> Linux Kernel设备驱动模型之 核心SR管理

Linux Kernel设备驱动模型之 核心SR管理

来源:图灵教育
时间:2023-05-30 09:33:15

static LIST_HEAD(syscore_ops_list);static DEFINE_MUTEX(syscore_ops_lock);/** * register_syscore_ops - Register a set of system core operations. * @ops: System core operations to register. */void register_syscore_ops(struct syscore_ops *ops){ mutex_lock(&syscore_ops_lock); list_add_tail(&ops->node, &syscore_ops_list); mutex_unlock(&syscore_ops_lock);}EXPORT_SYMBOL_GPL(register_syscore_ops);/** * unregister_syscore_ops - Unregister a set of system core operations. * @ops: System core operations to unregister. */void unregister_syscore_ops(struct syscore_ops *ops){ mutex_lock(&syscore_ops_lock); list_del(&ops->node); mutex_unlock(&syscore_ops_lock);}EXPORT_SYMBOL_GPL(unregister_syscore_ops);

上一篇:

TTY之struct tty_ldisc

下一篇:

sock结构