diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-10-29 21:03:04 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-10-29 21:03:04 -0600 |
commit | 26361be59c08917c47718bcd4114b8028aaf7810 (patch) | |
tree | b05dfad7baa755da4592a3d47412f1e062560a5e /libhw/alarmclock.c | |
parent | 3c3e9e2c62ad9a83ab9b0e1255204d57894c20ff (diff) |
libhw: Tidy
Diffstat (limited to 'libhw/alarmclock.c')
-rw-r--r-- | libhw/alarmclock.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/libhw/alarmclock.c b/libhw/alarmclock.c deleted file mode 100644 index 7b311c0..0000000 --- a/libhw/alarmclock.c +++ /dev/null @@ -1,21 +0,0 @@ -/* libhw/alarmclock.c - Device-independent <libhw/generic/alarmclock.h> utilities - * - * Copyright (C) 2024 Luke T. Shumaker <lukeshu@lukeshu.com> - * SPDX-License-Identifier: AGPL-3.0-or-later - */ - -#include <libcr/coroutine.h> -#include <libmisc/vcall.h> - -#include <libhw/generic/alarmclock.h> - -static void alarmclock_sleep_intrhandler(void *_arg) { - cid_t *cid = _arg; - cr_unpause_from_intrhandler(*cid); -} - -void alarmclock_sleep_until_ns(implements_alarmclock *clock, uint64_t abstime_ns) { - cid_t cid = cr_getcid(); - struct alarmclock_trigger trigger; - VCALL(clock, add_trigger, &trigger, abstime_ns, alarmclock_sleep_intrhandler, &cid); -} |