From 936fd0145896acbf55de496f036af55a01b80e82 Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Fri, 15 Nov 2024 11:58:59 -0700 Subject: libhw_generic: Split into a separate library --- libhw/common_alarmclock.c | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 libhw/common_alarmclock.c (limited to 'libhw/common_alarmclock.c') diff --git a/libhw/common_alarmclock.c b/libhw/common_alarmclock.c deleted file mode 100644 index 9812d44..0000000 --- a/libhw/common_alarmclock.c +++ /dev/null @@ -1,21 +0,0 @@ -/* libhw/common_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