From 26361be59c08917c47718bcd4114b8028aaf7810 Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Tue, 29 Oct 2024 21:03:04 -0600 Subject: libhw: Tidy --- libhw/alarmclock.c | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 libhw/alarmclock.c (limited to 'libhw/alarmclock.c') 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 utilities - * - * Copyright (C) 2024 Luke T. Shumaker - * SPDX-License-Identifier: AGPL-3.0-or-later - */ - -#include -#include - -#include - -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); -} -- cgit v1.2.3-2-g168b