From: visa Date: Sun, 11 Jun 2017 10:01:23 +0000 (+0000) Subject: Define register_splx_handler() in one place. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=aff9d0620f7d94075a6b93ed827ee492d760f438;p=openbsd Define register_splx_handler() in one place. --- diff --git a/sys/arch/loongson/include/intr.h b/sys/arch/loongson/include/intr.h index 1e7905d8d6c..66f1432b3d6 100644 --- a/sys/arch/loongson/include/intr.h +++ b/sys/arch/loongson/include/intr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.h,v 1.13 2017/05/17 11:52:25 visa Exp $ */ +/* $OpenBSD: intr.h,v 1.14 2017/06/11 10:01:23 visa Exp $ */ /* * Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -135,18 +135,7 @@ void splinit(void); #define splassert(X) #define splsoftassert(X) -/* Inlines */ -static __inline void register_splx_handler(void (*)(int)); - -typedef void (int_f)(int); -extern int_f *splx_hand; - -static __inline void -register_splx_handler(void(*handler)(int)) -{ - splx_hand = handler; -} - +void register_splx_handler(void (*)(int)); int splraise(int); void splx(int); int spllower(int); diff --git a/sys/arch/mips64/mips64/interrupt.c b/sys/arch/mips64/mips64/interrupt.c index f8b8ebda1be..ca5d709626b 100644 --- a/sys/arch/mips64/mips64/interrupt.c +++ b/sys/arch/mips64/mips64/interrupt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: interrupt.c,v 1.67 2016/08/16 13:03:58 visa Exp $ */ +/* $OpenBSD: interrupt.c,v 1.68 2017/06/11 10:01:23 visa Exp $ */ /* * Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -59,7 +59,7 @@ struct { uint32_t (*int_hand)(uint32_t, struct trapframe *); } cpu_int_tab[NLOWINT]; -int_f *splx_hand = &dummy_splx; +void (*splx_hand)(int) = &dummy_splx; /* * Modern versions of MIPS processors have extended interrupt @@ -221,6 +221,12 @@ splinit() (void)updateimask(0); } +void +register_splx_handler(void (*handler)(int)) +{ + splx_hand = handler; +} + int splraise(int newipl) { diff --git a/sys/arch/octeon/include/intr.h b/sys/arch/octeon/include/intr.h index df8f86c2c1c..a6129f9f8fa 100644 --- a/sys/arch/octeon/include/intr.h +++ b/sys/arch/octeon/include/intr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.h,v 1.9 2017/04/06 15:25:24 visa Exp $ */ +/* $OpenBSD: intr.h,v 1.10 2017/06/11 10:01:23 visa Exp $ */ /* * Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -139,18 +139,7 @@ void splinit(void); #define splassert(X) #define splsoftassert(X) -/* Inlines */ -static __inline void register_splx_handler(void (*)(int)); - -typedef void (int_f)(int); -extern int_f *splx_hand; - -static __inline void -register_splx_handler(void(*handler)(int)) -{ - splx_hand = handler; -} - +void register_splx_handler(void (*)(int)); int splraise(int); void splx(int); int spllower(int); diff --git a/sys/arch/sgi/include/intr.h b/sys/arch/sgi/include/intr.h index cd20096826a..9bd5674d42d 100644 --- a/sys/arch/sgi/include/intr.h +++ b/sys/arch/sgi/include/intr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.h,v 1.48 2017/02/11 03:44:22 visa Exp $ */ +/* $OpenBSD: intr.h,v 1.49 2017/06/11 10:01:23 visa Exp $ */ /* * Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -134,18 +134,7 @@ void splinit(void); #define splassert(X) #define splsoftassert(X) -/* Inlines */ -static __inline void register_splx_handler(void (*)(int)); - -typedef void (int_f)(int); -extern int_f *splx_hand; - -static __inline void -register_splx_handler(void(*handler)(int)) -{ - splx_hand = handler; -} - +void register_splx_handler(void (*)(int)); int splraise(int); void splx(int); int spllower(int);