blob: 89df68a6dc9c1c8cc73827ea64ed2f0688d13e64 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
/* libhw/host_alarmclock.h - <libhw/generic/alarmclock.h> implementation for hosted glibc
*
* Copyright (C) 2024-2025 Luke T. Shumaker <lukeshu@lukeshu.com>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
#ifndef _LIBHW_HOST_ALARMCLOCK_H_
#define _LIBHW_HOST_ALARMCLOCK_H_
#include <stdbool.h> /* for bool */
#include <time.h> /* for clockid_t, timer_t */
#include <libmisc/private.h>
#include <libhw/generic/alarmclock.h>
struct hostclock {
clockid_t clock_id;
BEGIN_PRIVATE(LIBHW_HOST_ALARMCLOCK_H)
bool initialized;
timer_t timer_id;
struct alarmclock_trigger *queue;
END_PRIVATE(LIBHW_HOST_ALARMCLOCK_H)
};
LO_IMPLEMENTATION_H(alarmclock, struct hostclock, hostclock)
#endif /* _LIBHW_HOST_ALARMCLOCK_H_ */
|