From 799b5cc6345abb898bd1ad0268a0399ed71f4c8c Mon Sep 17 00:00:00 2001 From: cheloha Date: Sun, 8 Oct 2023 21:08:00 +0000 Subject: [PATCH] clockintr: move intrclock wrappers from sys/clockintr.h to kern_clockintr.c intrclock_rearm() and intrclock_trigger() are not part of the public API, so there's no reason to implement them in sys/clockintr.h. Move them to kern_clockintr.c. --- sys/kern/kern_clockintr.c | 16 +++++++++++++++- sys/sys/clockintr.h | 14 +------------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/sys/kern/kern_clockintr.c b/sys/kern/kern_clockintr.c index 39ff1989429..712ddfbdb82 100644 --- a/sys/kern/kern_clockintr.c +++ b/sys/kern/kern_clockintr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_clockintr.c,v 1.58 2023/09/25 00:29:31 cheloha Exp $ */ +/* $OpenBSD: kern_clockintr.c,v 1.59 2023/10/08 21:08:00 cheloha Exp $ */ /* * Copyright (c) 2003 Dale Rahn * Copyright (c) 2020 Mark Kettenis @@ -41,6 +41,8 @@ void clockqueue_pend_delete(struct clockintr_queue *, struct clockintr *); void clockqueue_pend_insert(struct clockintr_queue *, struct clockintr *, uint64_t); void clockqueue_reset_intrclock(struct clockintr_queue *); +void intrclock_rearm(struct intrclock *, uint64_t); +void intrclock_trigger(struct intrclock *); uint64_t nsec_advance(uint64_t *, uint64_t, uint64_t); /* @@ -492,6 +494,18 @@ clockqueue_reset_intrclock(struct clockintr_queue *cq) intrclock_trigger(&cq->cq_intrclock); } +void +intrclock_rearm(struct intrclock *ic, uint64_t nsecs) +{ + ic->ic_rearm(ic->ic_cookie, nsecs); +} + +void +intrclock_trigger(struct intrclock *ic) +{ + ic->ic_trigger(ic->ic_cookie); +} + /* * Advance *next in increments of period until it exceeds now. * Returns the number of increments *next was advanced. diff --git a/sys/sys/clockintr.h b/sys/sys/clockintr.h index 7fc513669f2..ab6a39eb5cc 100644 --- a/sys/sys/clockintr.h +++ b/sys/sys/clockintr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: clockintr.h,v 1.20 2023/09/17 15:24:35 cheloha Exp $ */ +/* $OpenBSD: clockintr.h,v 1.21 2023/10/08 21:08:00 cheloha Exp $ */ /* * Copyright (c) 2020-2022 Scott Cheloha * @@ -47,18 +47,6 @@ struct intrclock { void (*ic_trigger)(void *); }; -static inline void -intrclock_rearm(struct intrclock *ic, uint64_t nsecs) -{ - ic->ic_rearm(ic->ic_cookie, nsecs); -} - -static inline void -intrclock_trigger(struct intrclock *ic) -{ - ic->ic_trigger(ic->ic_cookie); -} - /* * Schedulable clock interrupt callback. * -- 2.20.1