mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 13:11:40 +00:00
dde8b58d51
Add a pseudo RTC that simply is able to send an alarm signal waking up the system at a given time in the future. Since apparently timerfd_create() FDs don't support SIGIO, we use the sigio-creating helper thread, which just learned to do suspend/resume properly in the previous patch. For time-travel mode, OTOH, just add an event at the specified time in the future, and that's already sufficient to wake up the system at that point in time since suspend will just be in an "endless wait". For s2idle support also call pm_system_wakeup(). Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Richard Weinberger <richard@nod.at>
16 lines
417 B
C
16 lines
417 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Copyright (C) 2020 Intel Corporation
|
|
* Author: Johannes Berg <johannes@sipsolutions.net>
|
|
*/
|
|
#ifndef __UM_RTC_H__
|
|
#define __UM_RTC_H__
|
|
|
|
int uml_rtc_start(bool timetravel);
|
|
int uml_rtc_enable_alarm(unsigned long long delta_seconds);
|
|
void uml_rtc_disable_alarm(void);
|
|
void uml_rtc_stop(bool timetravel);
|
|
void uml_rtc_send_timetravel_alarm(void);
|
|
|
|
#endif /* __UM_RTC_H__ */
|