目录
框架位置
相关实现在drivers\base\syscore.c中
函数声明在include\linux\syscore_ops.h中。
依赖宏CONFIG_PM_SLEEP的使能
数据结构及接口
在头文件中,声明了函数原型以及相关结构体:
struct syscore_ops {
struct list_head node;
int (*suspend)(void);
void (*resume)(void);
void (*shutdown)(void);
};
extern void register_syscore_ops(struct syscore_ops *ops);
extern void unregister_syscore_ops(struct syscore_ops *ops);
#ifdef CONFIG_PM_SLEEP
extern int syscore_suspend(void);
extern void syscore_resume(void);
#endif
extern void syscore_shutdown(void);
#endif