函数逻辑报告 |
Source Code:kernel\power\suspend_test.c |
Create Date:2022-07-27 10:58:42 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:To test system suspend, we need a hands-off mechanism to resume the* system. RTCs wake alarms are a common self-contained mechanism.
函数原型:static void __init test_wakealarm(struct rtc_device *rtc, suspend_state_t state)
返回类型:void
参数:
类型 | 参数 | 名称 |
---|---|---|
struct rtc_device * | rtc | |
suspend_state_t | state |
64 | static char err_readtime[] __initdata = r conditions "PM: can't read %s time, err %d\n" |
66 | static char err_wakealarm[] __initdata = r conditions "PM: can't set %s wakealarm, err %d\n" |
68 | static char err_suspend[] __initdata = r conditions "PM: suspend test failed, error %d\n" |
70 | static char info_test[] __initdata = formational "PM: test RTC wakeup from '%s' suspend\n" |
78 | repeat : |
79 | status等于rtc_read_time(rtc, & ime the alarm is set to ) |
80 | 如果status小于0则 |
81 | printk(err_readtime, dev_name( & dev), status) |
82 | 返回 |
84 | rtc_tm_to_time( & ime the alarm is set to , & now) |
87 | rtc_time_to_tm(now + We test the system suspend code by setting an RTC wakealarm a short* time in the future, then suspending, & ime the alarm is set to ) |
88 | 0 = alarm disabled, 1 = alarm enabled = true |
90 | status等于rtc_set_alarm(rtc, & alm) |
91 | 如果status小于0则 |
92 | printk(err_wakealarm, dev_name( & dev), status) |
93 | 返回 |
96 | 如果state恒等于PM_SUSPEND_MEM则 |
99 | 如果status恒等于负ENODEV则state等于PM_SUSPEND_STANDBY |
102 | 如果state恒等于PM_SUSPEND_STANDBY则 |
105 | 如果status小于0则state等于PM_SUSPEND_TO_IDLE |
108 | 如果state恒等于PM_SUSPEND_TO_IDLE则 |
113 | 如果status小于0则printk(err_suspend, status) |
124 | 0 = alarm disabled, 1 = alarm enabled = false |
125 | rtc_set_alarm(rtc, & alm) |
名称 | 描述 |
---|---|
test_suspend |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |