diff options
author | Tom Rini <trini@konsulko.com> | 2022-10-26 07:45:55 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-10-26 07:45:55 -0400 |
commit | c2c485db455696850f17a874f8b5a11d13b31b5c (patch) | |
tree | 291e7cd1007f6cdf6e514c21edd5c2e5fa9a0a2e /arch/sandbox/cpu/os.c | |
parent | f9d16f2c0daf68dcb963c08c927f5f0a07cf75e4 (diff) | |
parent | 5e112c7ca8ee45860e27f23059d9a319ba8eb6d3 (diff) |
Merge https://source.denx.de/u-boot/custodians/u-boot-watchdog
- nuvoton: add expire function for generic reset (Jim)
- handle watchdogs during keyed autoboot (Rasmus)
- cyclic: Don't disable cylic function upon exceeding CPU time (Stefan)
- ulp wdog: Updates to support iMX93 and DM (Alice)
Diffstat (limited to 'arch/sandbox/cpu/os.c')
-rw-r--r-- | arch/sandbox/cpu/os.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/sandbox/cpu/os.c b/arch/sandbox/cpu/os.c index d6170adaf5..5e66304e2b 100644 --- a/arch/sandbox/cpu/os.c +++ b/arch/sandbox/cpu/os.c @@ -130,6 +130,23 @@ void os_exit(int exit_code) exit(exit_code); } +unsigned int os_alarm(unsigned int seconds) +{ + return alarm(seconds); +} + +void os_set_alarm_handler(void (*handler)(int)) +{ + if (!handler) + handler = SIG_DFL; + signal(SIGALRM, handler); +} + +void os_raise_sigalrm(void) +{ + raise(SIGALRM); +} + int os_write_file(const char *fname, const void *buf, int size) { int fd; |