summaryrefslogtreecommitdiff
path: root/sys/arch/alpha/include
diff options
context:
space:
mode:
authorScott Soule Cheloha <cheloha@cvs.openbsd.org>2024-01-24 19:23:40 +0000
committerScott Soule Cheloha <cheloha@cvs.openbsd.org>2024-01-24 19:23:40 +0000
commit8cb898c555527cf989801c7e83938ec6f7e32288 (patch)
tree32acb5bd373d406406213baca20ec260702dce12 /sys/arch/alpha/include
parent3dee2e31d0d48fb3d7aab4917b155daa51330768 (diff)
clockintr: switch from callee- to caller-allocated clockintr structs
Currently, clockintr_establish() calls malloc(9) to allocate a clockintr struct on behalf of the caller. mpi@ says this behavior is incompatible with dt(4). In particular, calling malloc(9) during the initialization of a PCB outside of dt_pcb_alloc() is (a) awkward and (b) may conflict with future changes/optimizations to PCB allocation. To side-step the problem, this patch changes the clockintr subsystem to use caller-allocated clockintr structs instead of callee-allocated structs. clockintr_establish() is named after softintr_establish(), which uses malloc(9) internally to create softintr objects. The clockintr subsystem is no longer using malloc(9), so the "establish" naming is no longer apt. To avoid confusion, this patch also renames "clockintr_establish" to "clockintr_bind". Requested by mpi@. Tweaked by mpi@. Thread: https://marc.info/?l=openbsd-tech&m=170597126103504&w=2 ok claudio@ mlarkin@ mpi@
Diffstat (limited to 'sys/arch/alpha/include')
-rw-r--r--sys/arch/alpha/include/cpu.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/alpha/include/cpu.h b/sys/arch/alpha/include/cpu.h
index b2a438f69e7..e03cd31325b 100644
--- a/sys/arch/alpha/include/cpu.h
+++ b/sys/arch/alpha/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.70 2023/07/25 18:16:19 cheloha Exp $ */
+/* $OpenBSD: cpu.h,v 1.71 2024/01/24 19:23:38 cheloha Exp $ */
/* $NetBSD: cpu.h,v 1.45 2000/08/21 02:03:12 thorpej Exp $ */
/*-
@@ -212,7 +212,7 @@ struct cpu_info {
#endif
#ifdef GPROF
struct gmonparam *ci_gmon;
- struct clockintr *ci_gmonclock;
+ struct clockintr ci_gmonclock;
#endif
struct clockintr_queue ci_queue;
char ci_panicbuf[512];