From: cheloha Date: Sun, 17 Sep 2023 15:24:35 +0000 (+0000) Subject: clockintr.h: forward-declare "struct cpu_info" for clockintr_establish() X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=649d9dd9bffc397bf427f3f4635b89e9e729a09c;p=openbsd clockintr.h: forward-declare "struct cpu_info" for clockintr_establish() With input from claudio@ and deraadt@. --- diff --git a/sys/kern/kern_clockintr.c b/sys/kern/kern_clockintr.c index af3a0707f3b..19968890e15 100644 --- a/sys/kern/kern_clockintr.c +++ b/sys/kern/kern_clockintr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_clockintr.c,v 1.55 2023/09/17 15:05:45 cheloha Exp $ */ +/* $OpenBSD: kern_clockintr.c,v 1.56 2023/09/17 15:24:35 cheloha Exp $ */ /* * Copyright (c) 2003 Dale Rahn * Copyright (c) 2020 Mark Kettenis @@ -333,10 +333,9 @@ clockintr_cancel(struct clockintr *cl) } struct clockintr * -clockintr_establish(void *vci, +clockintr_establish(struct cpu_info *ci, void (*func)(struct clockintr *, void *, void *), void *arg) { - struct cpu_info *ci = vci; struct clockintr *cl; struct clockintr_queue *cq = &ci->ci_queue; diff --git a/sys/sys/clockintr.h b/sys/sys/clockintr.h index 3634126ce38..7fc513669f2 100644 --- a/sys/sys/clockintr.h +++ b/sys/sys/clockintr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: clockintr.h,v 1.19 2023/09/17 15:05:44 cheloha Exp $ */ +/* $OpenBSD: clockintr.h,v 1.20 2023/09/17 15:24:35 cheloha Exp $ */ /* * Copyright (c) 2020-2022 Scott Cheloha * @@ -35,6 +35,8 @@ struct clockintr_stat { #include #include +struct cpu_info; + /* * Platform API */ @@ -120,7 +122,7 @@ void clockintr_trigger(void); uint64_t clockintr_advance(struct clockintr *, uint64_t); uint64_t clockintr_advance_random(struct clockintr *, uint64_t, uint32_t); void clockintr_cancel(struct clockintr *); -struct clockintr *clockintr_establish(void *, +struct clockintr *clockintr_establish(struct cpu_info *, void (*)(struct clockintr *, void *, void *), void *); void clockintr_stagger(struct clockintr *, uint64_t, uint32_t, uint32_t); void clockqueue_init(struct clockintr_queue *);