Module Name: src Committed By: christos Date: Thu Apr 19 21:19:07 UTC 2018
Modified Files: src/sys/sys: bus.h clock.h cprng.h cpu.h dtrace_bsd.h gcq.h kernhist.h ktrace.h lwp.h msgbuf.h pmf.h proc.h pslist.h rndsource.h signalvar.h sleepq.h socket.h socketvar.h syscallvar.h timevar.h vnode.h Log Message: s/static inline/static __inline/g for consistency with other include headers. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/sys/bus.h src/sys/sys/syscallvar.h cvs rdiff -u -r1.3 -r1.4 src/sys/sys/clock.h cvs rdiff -u -r1.12 -r1.13 src/sys/sys/cprng.h cvs rdiff -u -r1.42 -r1.43 src/sys/sys/cpu.h cvs rdiff -u -r1.8 -r1.9 src/sys/sys/dtrace_bsd.h cvs rdiff -u -r1.2 -r1.3 src/sys/sys/gcq.h cvs rdiff -u -r1.22 -r1.23 src/sys/sys/kernhist.h cvs rdiff -u -r1.65 -r1.66 src/sys/sys/ktrace.h cvs rdiff -u -r1.178 -r1.179 src/sys/sys/lwp.h cvs rdiff -u -r1.16 -r1.17 src/sys/sys/msgbuf.h cvs rdiff -u -r1.23 -r1.24 src/sys/sys/pmf.h cvs rdiff -u -r1.345 -r1.346 src/sys/sys/proc.h cvs rdiff -u -r1.4 -r1.5 src/sys/sys/pslist.h cvs rdiff -u -r1.5 -r1.6 src/sys/sys/rndsource.h cvs rdiff -u -r1.88 -r1.89 src/sys/sys/signalvar.h cvs rdiff -u -r1.24 -r1.25 src/sys/sys/sleepq.h cvs rdiff -u -r1.123 -r1.124 src/sys/sys/socket.h cvs rdiff -u -r1.151 -r1.152 src/sys/sys/socketvar.h cvs rdiff -u -r1.37 -r1.38 src/sys/sys/timevar.h cvs rdiff -u -r1.279 -r1.280 src/sys/sys/vnode.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/sys/bus.h diff -u src/sys/sys/bus.h:1.11 src/sys/sys/bus.h:1.12 --- src/sys/sys/bus.h:1.11 Mon May 7 14:16:38 2012 +++ src/sys/sys/bus.h Thu Apr 19 17:19:07 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: bus.h,v 1.11 2012/05/07 18:16:38 tsutsui Exp $ */ +/* $NetBSD: bus.h,v 1.12 2018/04/19 21:19:07 christos Exp $ */ /*- * Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -42,13 +42,13 @@ struct bus_space_reservation { typedef struct bus_space_reservation bus_space_reservation_t; -static inline bus_size_t +static __inline bus_size_t bus_space_reservation_size(bus_space_reservation_t *bsr) { return bsr->_bsr_size; } -static inline bus_space_reservation_t * +static __inline bus_space_reservation_t * bus_space_reservation_init(bus_space_reservation_t *bsr, bus_addr_t addr, bus_size_t size) { @@ -57,7 +57,7 @@ bus_space_reservation_init(bus_space_res return bsr; } -static inline bus_addr_t +static __inline bus_addr_t bus_space_reservation_addr(bus_space_reservation_t *bsr) { return bsr->_bsr_start; Index: src/sys/sys/syscallvar.h diff -u src/sys/sys/syscallvar.h:1.11 src/sys/sys/syscallvar.h:1.12 --- src/sys/sys/syscallvar.h:1.11 Thu Sep 24 10:34:22 2015 +++ src/sys/sys/syscallvar.h Thu Apr 19 17:19:07 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: syscallvar.h,v 1.11 2015/09/24 14:34:22 christos Exp $ */ +/* $NetBSD: syscallvar.h,v 1.12 2018/04/19 21:19:07 christos Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -55,7 +55,7 @@ void syscall_init(void); int syscall_establish(const struct emul *, const struct syscall_package *); int syscall_disestablish(const struct emul *, const struct syscall_package *); -static inline int +static __inline int sy_call(const struct sysent *sy, struct lwp *l, const void *uap, register_t *rval) { @@ -68,7 +68,7 @@ sy_call(const struct sysent *sy, struct return error; } -static inline int +static __inline int sy_invoke(const struct sysent *sy, struct lwp *l, const void *uap, register_t *rval, int code) { Index: src/sys/sys/clock.h diff -u src/sys/sys/clock.h:1.3 src/sys/sys/clock.h:1.4 --- src/sys/sys/clock.h:1.3 Mon Nov 17 12:11:29 2014 +++ src/sys/sys/clock.h Thu Apr 19 17:19:07 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: clock.h,v 1.3 2014/11/17 17:11:29 christos Exp $ */ +/* $NetBSD: clock.h,v 1.4 2018/04/19 21:19:07 christos Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -45,7 +45,7 @@ #define POSIX_BASE_YEAR 1970 /* Some handy functions */ -static inline int +static __inline int days_in_month(int m) { switch (m) { @@ -68,7 +68,7 @@ days_in_month(int m) * ((year % 400) == 0) ) * It is otherwise equivalent. */ -static inline int +static __inline int is_leap_year(uint64_t year) { if ((year & 3) != 0) @@ -80,7 +80,7 @@ is_leap_year(uint64_t year) return __predict_false((year % 400) == 0); } -static inline int +static __inline int days_per_year(uint64_t year) { return is_leap_year(year) ? DAYS_PER_LEAP_YEAR : DAYS_PER_COMMON_YEAR; Index: src/sys/sys/cprng.h diff -u src/sys/sys/cprng.h:1.12 src/sys/sys/cprng.h:1.13 --- src/sys/sys/cprng.h:1.12 Mon Apr 13 11:51:30 2015 +++ src/sys/sys/cprng.h Thu Apr 19 17:19:07 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: cprng.h,v 1.12 2015/04/13 15:51:30 riastradh Exp $ */ +/* $NetBSD: cprng.h,v 1.13 2018/04/19 21:19:07 christos Exp $ */ /*- * Copyright (c) 2011-2013 The NetBSD Foundation, Inc. @@ -71,7 +71,7 @@ int cprng_strong_poll(cprng_strong_t *, extern cprng_strong_t *kern_cprng; -static inline uint32_t +static __inline uint32_t cprng_strong32(void) { uint32_t r; @@ -79,7 +79,7 @@ cprng_strong32(void) return r; } -static inline uint64_t +static __inline uint64_t cprng_strong64(void) { uint64_t r; @@ -87,7 +87,7 @@ cprng_strong64(void) return r; } -static inline unsigned int +static __inline unsigned int cprng_strong_strength(cprng_strong_t *c) { return NIST_BLOCK_KEYLEN_BYTES; Index: src/sys/sys/cpu.h diff -u src/sys/sys/cpu.h:1.42 src/sys/sys/cpu.h:1.43 --- src/sys/sys/cpu.h:1.42 Fri Dec 15 19:37:51 2017 +++ src/sys/sys/cpu.h Thu Apr 19 17:19:07 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.42 2017/12/16 00:37:51 mrg Exp $ */ +/* $NetBSD: cpu.h,v 1.43 2018/04/19 21:19:07 christos Exp $ */ /*- * Copyright (c) 2007 YAMAMOTO Takashi, @@ -108,13 +108,13 @@ extern struct cpu_info **cpu_infos; extern kcpuset_t *kcpuset_attached; extern kcpuset_t *kcpuset_running; -static inline u_int +static __inline u_int cpu_index(const struct cpu_info *ci) { return ci->ci_index; } -static inline char * +static __inline char * cpu_name(struct cpu_info *ci) { return ci->ci_data.cpu_name; Index: src/sys/sys/dtrace_bsd.h diff -u src/sys/sys/dtrace_bsd.h:1.8 src/sys/sys/dtrace_bsd.h:1.9 --- src/sys/sys/dtrace_bsd.h:1.8 Sat Oct 18 04:33:29 2014 +++ src/sys/sys/dtrace_bsd.h Thu Apr 19 17:19:07 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: dtrace_bsd.h,v 1.8 2014/10/18 08:33:29 snj Exp $ */ +/* $NetBSD: dtrace_bsd.h,v 1.9 2018/04/19 21:19:07 christos Exp $ */ /*- * Copyright (c) 2007-2008 John Birrell (j...@freebsd.org) @@ -169,16 +169,16 @@ uint64_t dtrace_gethrestime(void); * processes and lwps. */ -static inline size_t kdtrace_proc_size(void); -static inline void kdtrace_proc_ctor(void *, struct proc *); -static inline void kdtrace_proc_dtor(void *, struct proc *); -static inline size_t kdtrace_thread_size(void); -static inline void kdtrace_thread_ctor(void *, struct lwp *); -static inline void kdtrace_thread_dtor(void *, struct lwp *); +static __inline size_t kdtrace_proc_size(void); +static __inline void kdtrace_proc_ctor(void *, struct proc *); +static __inline void kdtrace_proc_dtor(void *, struct proc *); +static __inline size_t kdtrace_thread_size(void); +static __inline void kdtrace_thread_ctor(void *, struct lwp *); +static __inline void kdtrace_thread_dtor(void *, struct lwp *); /* Return the DTrace process data size compiled in the kernel hooks. */ -static inline size_t +static __inline size_t kdtrace_proc_size(void) { @@ -186,14 +186,14 @@ kdtrace_proc_size(void) } /* Return the DTrace thread data size compiled in the kernel hooks. */ -static inline size_t +static __inline size_t kdtrace_thread_size(void) { return KDTRACE_THREAD_SIZE; } -static inline void +static __inline void kdtrace_proc_ctor(void *arg, struct proc *p) { @@ -202,7 +202,7 @@ kdtrace_proc_ctor(void *arg, struct proc #endif } -static inline void +static __inline void kdtrace_proc_dtor(void *arg, struct proc *p) { @@ -214,7 +214,7 @@ kdtrace_proc_dtor(void *arg, struct proc #endif } -static inline void +static __inline void kdtrace_thread_ctor(void *arg, struct lwp *l) { @@ -223,7 +223,7 @@ kdtrace_thread_ctor(void *arg, struct lw #endif } -static inline void +static __inline void kdtrace_thread_dtor(void *arg, struct lwp *l) { Index: src/sys/sys/gcq.h diff -u src/sys/sys/gcq.h:1.2 src/sys/sys/gcq.h:1.3 --- src/sys/sys/gcq.h:1.2 Sun Aug 19 03:35:32 2007 +++ src/sys/sys/gcq.h Thu Apr 19 17:19:07 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: gcq.h,v 1.2 2007/08/19 07:35:32 kiyohara Exp $ */ +/* $NetBSD: gcq.h,v 1.3 2018/04/19 21:19:07 christos Exp $ */ /* * Not (c) 2007 Matthew Orgass * This file is public domain, meaning anyone can make any use of part or all @@ -50,61 +50,61 @@ struct gcq_head { #define GCQ_INIT(q) { &(q), &(q) } #define GCQ_INIT_HEAD(head) { GCQ_INIT((head).hq) } -__attribute__((nonnull, always_inline)) static inline void +__attribute__((nonnull, always_inline)) static __inline void gcq_init(struct gcq *q) { q->q_next = q->q_prev = q; } __attribute__((nonnull, const, warn_unused_result, always_inline)) -static inline struct gcq * +static __inline struct gcq * gcq_q(struct gcq *q) { return q; } __attribute__((nonnull, const, warn_unused_result, always_inline)) -static inline struct gcq * +static __inline struct gcq * gcq_hq(struct gcq_head *head) { return (struct gcq *)head; } __attribute__((nonnull, const, warn_unused_result, always_inline)) -static inline struct gcq_head * +static __inline struct gcq_head * gcq_head(struct gcq *q) { return (struct gcq_head *)q; } -__attribute__((nonnull, always_inline)) static inline void +__attribute__((nonnull, always_inline)) static __inline void gcq_init_head(struct gcq_head *head) { gcq_init(gcq_hq(head)); } __attribute__((nonnull, pure, warn_unused_result, always_inline)) -static inline bool +static __inline bool gcq_onlist(struct gcq *q) { return (q->q_next != q); } __attribute__((nonnull, pure, warn_unused_result, always_inline)) -static inline bool +static __inline bool gcq_empty(struct gcq_head *head) { return (!gcq_onlist(gcq_hq(head))); } __attribute__((nonnull, pure, warn_unused_result, always_inline)) -static inline bool +static __inline bool gcq_linked(struct gcq *prev, struct gcq *next) { return (prev->q_next == next && next->q_prev == prev); } -__attribute__((nonnull, always_inline)) static inline void +__attribute__((nonnull, always_inline)) static __inline void gcq_insert_after(struct gcq *on, struct gcq *off) { struct gcq *on_next; @@ -117,7 +117,7 @@ gcq_insert_after(struct gcq *on, struct on->q_next = off; } -__attribute__((nonnull)) static inline void +__attribute__((nonnull)) static __inline void gcq_insert_before(struct gcq *on, struct gcq *off) { struct gcq *on_prev; @@ -130,19 +130,19 @@ gcq_insert_before(struct gcq *on, struct on->q_prev = off; } -__attribute__((nonnull, always_inline)) static inline void +__attribute__((nonnull, always_inline)) static __inline void gcq_insert_head(struct gcq_head *head, struct gcq *q) { gcq_insert_after(gcq_hq(head), q); } -__attribute__((nonnull, always_inline)) static inline void +__attribute__((nonnull, always_inline)) static __inline void gcq_insert_tail(struct gcq_head *head, struct gcq *q) { gcq_insert_before(gcq_hq(head), q); } -__attribute__((nonnull)) static inline void +__attribute__((nonnull)) static __inline void gcq_tie(struct gcq *dst, struct gcq *src) { struct gcq *dst_next, *src_prev; @@ -155,20 +155,20 @@ gcq_tie(struct gcq *dst, struct gcq *src dst->q_next = src; } -__attribute__((nonnull, always_inline)) static inline void +__attribute__((nonnull, always_inline)) static __inline void gcq_tie_after(struct gcq *dst, struct gcq *src) { GCQ_ASSERT(dst != src && dst->q_prev != src); gcq_tie(dst, src); } -__attribute__((nonnull, always_inline)) static inline void +__attribute__((nonnull, always_inline)) static __inline void gcq_tie_before(struct gcq *dst, struct gcq *src) { gcq_tie_after(dst->q_prev, src); } -__attribute__((nonnull)) static inline struct gcq * +__attribute__((nonnull)) static __inline struct gcq * gcq_remove(struct gcq *q) { struct gcq *next, *prev; @@ -182,7 +182,7 @@ gcq_remove(struct gcq *q) } #ifdef GCQ_UNCONDITIONAL_MERGE -__attribute__((nonnull)) static inline void +__attribute__((nonnull)) static __inline void gcq_merge(struct gcq *dst, struct gcq *src) { GCQ_ASSERT(dst != src && dst->q_prev != src); @@ -190,19 +190,19 @@ gcq_merge(struct gcq *dst, struct gcq *s gcq_tie(src, src); } -__attribute__((nonnull, always_inline)) static inline void +__attribute__((nonnull, always_inline)) static __inline void gcq_merge_head(struct gcq_head *dst, struct gcq_head *src) { gcq_merge(gcq_hq(dst), gcq_hq(src)); } -__attribute__((nonnull, always_inline)) static inline void +__attribute__((nonnull, always_inline)) static __inline void gcq_merge_tail(struct gcq_head *dst, struct gcq_head *src) { gcq_merge(gcq_hq(dst)->q_prev, gcq_hq(src)); } #else -__attribute__((nonnull)) static inline void +__attribute__((nonnull)) static __inline void gcq_merge(struct gcq *dst, struct gcq *src) { struct gcq *dst_next, *src_prev, *src_next; @@ -221,20 +221,20 @@ gcq_merge(struct gcq *dst, struct gcq *s } } -__attribute__((nonnull, always_inline)) static inline void +__attribute__((nonnull, always_inline)) static __inline void gcq_merge_head(struct gcq_head *dst, struct gcq_head *src) { gcq_merge(gcq_hq(dst), gcq_hq(src)); } -__attribute__((nonnull, always_inline)) static inline void +__attribute__((nonnull, always_inline)) static __inline void gcq_merge_tail(struct gcq_head *dst, struct gcq_head *src) { gcq_merge(gcq_hq(dst)->q_prev, gcq_hq(src)); } #endif -__attribute__((nonnull)) static inline void +__attribute__((nonnull)) static __inline void gcq_clear(struct gcq *q) { struct gcq *nq, *next; @@ -246,13 +246,13 @@ gcq_clear(struct gcq *q) } while (next != q); } -__attribute__((nonnull, always_inline)) static inline void +__attribute__((nonnull, always_inline)) static __inline void gcq_remove_all(struct gcq_head *head) { gcq_clear(gcq_hq(head)); } -__attribute__((nonnull, always_inline)) static inline struct gcq * +__attribute__((nonnull, always_inline)) static __inline struct gcq * _gcq_next(struct gcq *current, struct gcq_head *head, struct gcq *start) { struct gcq *q, *hq; @@ -265,7 +265,7 @@ _gcq_next(struct gcq *current, struct gc return q; } -__attribute__((nonnull, always_inline)) static inline struct gcq * +__attribute__((nonnull, always_inline)) static __inline struct gcq * _gcq_prev(struct gcq *current, struct gcq_head *head, struct gcq *start) { struct gcq *q, *hq; Index: src/sys/sys/kernhist.h diff -u src/sys/sys/kernhist.h:1.22 src/sys/sys/kernhist.h:1.23 --- src/sys/sys/kernhist.h:1.22 Fri Nov 3 18:45:14 2017 +++ src/sys/sys/kernhist.h Thu Apr 19 17:19:07 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: kernhist.h,v 1.22 2017/11/03 22:45:14 pgoyette Exp $ */ +/* $NetBSD: kernhist.h,v 1.23 2018/04/19 21:19:07 christos Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -257,7 +257,7 @@ do { \ #define KERNHIST_DUMP(NAME) #endif -static inline void +static __inline void kernhist_entry_print(const struct kern_history_ent *e, void (*pr)(const char *, ...) __printflike(1, 2)) { struct timeval tv; Index: src/sys/sys/ktrace.h diff -u src/sys/sys/ktrace.h:1.65 src/sys/sys/ktrace.h:1.66 --- src/sys/sys/ktrace.h:1.65 Tue Sep 13 03:39:45 2016 +++ src/sys/sys/ktrace.h Thu Apr 19 17:19:07 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ktrace.h,v 1.65 2016/09/13 07:39:45 martin Exp $ */ +/* $NetBSD: ktrace.h,v 1.66 2018/04/19 21:19:07 christos Exp $ */ /* * Copyright (c) 1988, 1993 @@ -304,7 +304,7 @@ void ktr_execfd(int, u_int); int ktrace_common(lwp_t *, int, int, int, file_t **); -static inline int +static __inline int ktrenter(lwp_t *l) { @@ -314,118 +314,118 @@ ktrenter(lwp_t *l) return 0; } -static inline void +static __inline void ktrexit(lwp_t *l) { l->l_pflag &= ~LP_KTRACTIVE; } -static inline bool +static __inline bool ktrpoint(int fac) { return __predict_false(ktrace_on) && __predict_false(ktr_point(1 << fac)); } -static inline void +static __inline void ktrcsw(int a, int b) { if (__predict_false(ktrace_on)) ktr_csw(a, b); } -static inline void +static __inline void ktremul(void) { if (__predict_false(ktrace_on)) ktr_emul(); } -static inline void +static __inline void ktrgenio(int a, enum uio_rw b, const void *c, size_t d, int e) { if (__predict_false(ktrace_on)) ktr_genio(a, b, c, d, e); } -static inline void +static __inline void ktrgeniov(int a, enum uio_rw b, struct iovec *c, int d, int e) { if (__predict_false(ktrace_on)) ktr_geniov(a, b, c, d, e); } -static inline void +static __inline void ktrmibio(int a, enum uio_rw b, const void *c, size_t d, int e) { if (__predict_false(ktrace_on)) ktr_mibio(a, b, c, d, e); } -static inline void +static __inline void ktrnamei(const char *a, size_t b) { if (__predict_false(ktrace_on)) ktr_namei(a, b); } -static inline void +static __inline void ktrnamei2(const char *a, size_t b, const char *c, size_t d) { if (__predict_false(ktrace_on)) ktr_namei2(a, b, c, d); } -static inline void +static __inline void ktrpsig(int a, sig_t b, const sigset_t *c, const ksiginfo_t * d) { if (__predict_false(ktrace_on)) ktr_psig(a, b, c, d); } -static inline void +static __inline void ktrsyscall(register_t code, const register_t args[], int narg) { if (__predict_false(ktrace_on)) ktr_syscall(code, args, narg); } -static inline void +static __inline void ktrsysret(register_t a, int b, register_t *c) { if (__predict_false(ktrace_on)) ktr_sysret(a, b, c); } -static inline void +static __inline void ktrkuser(const char *a, const void *b, size_t c) { if (__predict_false(ktrace_on)) ktr_kuser(a, b, c); } -static inline void +static __inline void ktrmib(const int *a , u_int b) { if (__predict_false(ktrace_on)) ktr_mib(a, b); } -static inline void +static __inline void ktrexecarg(const void *a, size_t b) { if (__predict_false(ktrace_on)) ktr_execarg(a, b); } -static inline void +static __inline void ktrexecenv(const void *a, size_t b) { if (__predict_false(ktrace_on)) ktr_execenv(a, b); } -static inline void +static __inline void ktrexecfd(int fd, u_int dtype) { if (__predict_false(ktrace_on)) Index: src/sys/sys/lwp.h diff -u src/sys/sys/lwp.h:1.178 src/sys/sys/lwp.h:1.179 --- src/sys/sys/lwp.h:1.178 Fri Feb 16 02:11:50 2018 +++ src/sys/sys/lwp.h Thu Apr 19 17:19:07 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: lwp.h,v 1.178 2018/02/16 07:11:50 ozaki-r Exp $ */ +/* $NetBSD: lwp.h,v 1.179 2018/04/19 21:19:07 christos Exp $ */ /* * Copyright (c) 2001, 2006, 2007, 2008, 2009, 2010 @@ -51,7 +51,7 @@ #if defined(_KERNEL) struct lwp; /* forward declare this for <machine/cpu.h> so it can get l_cpu. */ -static inline struct cpu_info *lwp_getcpu(struct lwp *); +static __inline struct cpu_info *lwp_getcpu(struct lwp *); #include <machine/cpu.h> /* curcpu() and cpu_info */ #endif @@ -291,7 +291,7 @@ extern int maxlwp __read_mostly; /* max #define LSSUSPENDED 8 /* Not running, not signalable. */ #if defined(_KERNEL) || defined(_KMEMUSER) -static inline void * +static __inline void * lwp_getpcb(struct lwp *l) { @@ -366,7 +366,7 @@ void lwp_whatis(uintptr_t, void (*)(cons /* * Lock an LWP. XXX _MODULE */ -static inline void +static __inline void lwp_lock(lwp_t *l) { kmutex_t *old = l->l_mutex; @@ -386,13 +386,13 @@ lwp_lock(lwp_t *l) /* * Unlock an LWP. XXX _MODULE */ -static inline void +static __inline void lwp_unlock(lwp_t *l) { mutex_spin_exit(l->l_mutex); } -static inline void +static __inline void lwp_changepri(lwp_t *l, pri_t pri) { KASSERT(mutex_owned(l->l_mutex)); @@ -404,7 +404,7 @@ lwp_changepri(lwp_t *l, pri_t pri) KASSERT(l->l_priority == pri); } -static inline void +static __inline void lwp_lendpri(lwp_t *l, pri_t pri) { KASSERT(mutex_owned(l->l_mutex)); @@ -413,7 +413,7 @@ lwp_lendpri(lwp_t *l, pri_t pri) KASSERT(l->l_inheritedprio == pri); } -static inline pri_t +static __inline pri_t lwp_eprio(lwp_t *l) { pri_t pri; @@ -432,19 +432,19 @@ int lwp_create(lwp_t *, struct proc *, v * We should provide real stubs for the below that modules can use. */ -static inline void +static __inline void spc_lock(struct cpu_info *ci) { mutex_spin_enter(ci->ci_schedstate.spc_mutex); } -static inline void +static __inline void spc_unlock(struct cpu_info *ci) { mutex_spin_exit(ci->ci_schedstate.spc_mutex); } -static inline void +static __inline void spc_dlock(struct cpu_info *ci1, struct cpu_info *ci2) { struct schedstate_percpu *spc1 = &ci1->ci_schedstate; @@ -477,13 +477,13 @@ extern struct lwp *curlwp; /* Current r * This provide a way for <machine/cpu.h> to get l_cpu for curlwp before * struct lwp is defined. */ -static inline struct cpu_info * +static __inline struct cpu_info * lwp_getcpu(struct lwp *l) { return l->l_cpu; } -static inline bool +static __inline bool CURCPU_IDLE_P(void) { struct cpu_info *ci = curcpu(); @@ -496,7 +496,7 @@ CURCPU_IDLE_P(void) * compiled as a module should use kpreempt_disable() and * kpreempt_enable(). */ -static inline void +static __inline void KPREEMPT_DISABLE(lwp_t *l) { @@ -505,7 +505,7 @@ KPREEMPT_DISABLE(lwp_t *l) __insn_barrier(); } -static inline void +static __inline void KPREEMPT_ENABLE(lwp_t *l) { @@ -529,7 +529,7 @@ KPREEMPT_ENABLE(lwp_t *l) * curlwp_bindx. One use case is psref(9) that has a contract that * forbids migrations. */ -static inline int +static __inline int curlwp_bind(void) { int bound; @@ -541,7 +541,7 @@ curlwp_bind(void) return bound; } -static inline void +static __inline void curlwp_bindx(int bound) { Index: src/sys/sys/msgbuf.h diff -u src/sys/sys/msgbuf.h:1.16 src/sys/sys/msgbuf.h:1.17 --- src/sys/sys/msgbuf.h:1.16 Sat Mar 31 19:12:01 2018 +++ src/sys/sys/msgbuf.h Thu Apr 19 17:19:07 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: msgbuf.h,v 1.16 2018/03/31 23:12:01 christos Exp $ */ +/* $NetBSD: msgbuf.h,v 1.17 2018/04/19 21:19:07 christos Exp $ */ /* * Copyright (c) 1981, 1984, 1993 @@ -52,7 +52,7 @@ void initmsgbuf(void *, size_t); void loginit(void); void logputchar(int); -static inline int +static __inline int logenabled(const struct kern_msgbuf *mbp) { return msgbufenabled && mbp->msg_magic == MSG_MAGIC; Index: src/sys/sys/pmf.h diff -u src/sys/sys/pmf.h:1.23 src/sys/sys/pmf.h:1.24 --- src/sys/sys/pmf.h:1.23 Sun Mar 4 14:23:33 2018 +++ src/sys/sys/pmf.h Thu Apr 19 17:19:07 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pmf.h,v 1.23 2018/03/04 19:23:33 kre Exp $ */ +/* $NetBSD: pmf.h,v 1.24 2018/04/19 21:19:07 christos Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill <jmcne...@invisible.ca> @@ -120,19 +120,19 @@ void pmf_qual_recursive_copy(pmf_qual_t void pmf_self_suspensor_init(device_t, device_suspensor_t *, pmf_qual_t *); -static inline const device_suspensor_t * +static __inline const device_suspensor_t * pmf_qual_suspension(const pmf_qual_t *pq) { return pq->pq_suspensor; } -static inline devact_level_t +static __inline devact_level_t pmf_qual_depth(const pmf_qual_t *pq) { return pq->pq_actlvl; } -static inline bool +static __inline bool pmf_qual_descend_ok(const pmf_qual_t *pq) { return pq->pq_actlvl == DEVACT_LEVEL_FULL; Index: src/sys/sys/proc.h diff -u src/sys/sys/proc.h:1.345 src/sys/sys/proc.h:1.346 --- src/sys/sys/proc.h:1.345 Mon Apr 16 10:51:59 2018 +++ src/sys/sys/proc.h Thu Apr 19 17:19:07 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: proc.h,v 1.345 2018/04/16 14:51:59 kamil Exp $ */ +/* $NetBSD: proc.h,v 1.346 2018/04/19 21:19:07 christos Exp $ */ /*- * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -556,7 +556,7 @@ int proc_compare(const struct proc *, co int proclist_foreach_call(struct proclist *, int (*)(struct proc *, void *arg), void *); -static inline struct proc * +static __inline struct proc * _proclist_skipmarker(struct proc *p0) { struct proc *p = p0; Index: src/sys/sys/pslist.h diff -u src/sys/sys/pslist.h:1.4 src/sys/sys/pslist.h:1.5 --- src/sys/sys/pslist.h:1.4 Fri Nov 18 01:41:52 2016 +++ src/sys/sys/pslist.h Thu Apr 19 17:19:07 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pslist.h,v 1.4 2016/11/18 06:41:52 riastradh Exp $ */ +/* $NetBSD: pslist.h,v 1.5 2018/04/19 21:19:07 christos Exp $ */ /*- * Copyright (c) 2016 The NetBSD Foundation, Inc. @@ -61,21 +61,21 @@ struct pslist_entry { * excluding writers and readers. */ -static inline void +static __inline void pslist_init(struct pslist_head *head) { head->plh_first = NULL; } -static inline void +static __inline void pslist_destroy(struct pslist_head *head __diagused) { _PSLIST_ASSERT(head->plh_first == NULL); } -static inline void +static __inline void pslist_entry_init(struct pslist_entry *entry) { @@ -83,7 +83,7 @@ pslist_entry_init(struct pslist_entry *e entry->ple_prevp = NULL; } -static inline void +static __inline void pslist_entry_destroy(struct pslist_entry *entry) { @@ -109,7 +109,7 @@ pslist_entry_destroy(struct pslist_entry * memory barriers is inconsequential. */ -static inline void +static __inline void pslist_writer_insert_head(struct pslist_head *head, struct pslist_entry *new) { @@ -126,7 +126,7 @@ pslist_writer_insert_head(struct pslist_ head->plh_first = new; } -static inline void +static __inline void pslist_writer_insert_before(struct pslist_entry *entry, struct pslist_entry *new) { @@ -144,7 +144,7 @@ pslist_writer_insert_before(struct pslis entry->ple_prevp = &new->ple_next; } -static inline void +static __inline void pslist_writer_insert_after(struct pslist_entry *entry, struct pslist_entry *new) { @@ -163,7 +163,7 @@ pslist_writer_insert_after(struct pslist entry->ple_next = new; } -static inline void +static __inline void pslist_writer_remove(struct pslist_entry *entry) { @@ -184,14 +184,14 @@ pslist_writer_remove(struct pslist_entry */ } -static inline struct pslist_entry * +static __inline struct pslist_entry * pslist_writer_first(const struct pslist_head *head) { return head->plh_first; } -static inline struct pslist_entry * +static __inline struct pslist_entry * pslist_writer_next(const struct pslist_entry *entry) { @@ -199,7 +199,7 @@ pslist_writer_next(const struct pslist_e return entry->ple_next; } -static inline void * +static __inline void * _pslist_writer_first_container(const struct pslist_head *head, const ptrdiff_t offset) { @@ -208,7 +208,7 @@ _pslist_writer_first_container(const str return (first == NULL ? NULL : (char *)first - offset); } -static inline void * +static __inline void * _pslist_writer_next_container(const struct pslist_entry *entry, const ptrdiff_t offset) { @@ -225,7 +225,7 @@ _pslist_writer_next_container(const stru * dereferencing the resulting pointer. */ -static inline struct pslist_entry * +static __inline struct pslist_entry * pslist_reader_first(const struct pslist_head *head) { struct pslist_entry *first = head->plh_first; @@ -236,7 +236,7 @@ pslist_reader_first(const struct pslist_ return first; } -static inline struct pslist_entry * +static __inline struct pslist_entry * pslist_reader_next(const struct pslist_entry *entry) { struct pslist_entry *next = entry->ple_next; @@ -248,7 +248,7 @@ pslist_reader_next(const struct pslist_e return next; } -static inline void * +static __inline void * _pslist_reader_first_container(const struct pslist_head *head, const ptrdiff_t offset) { @@ -261,7 +261,7 @@ _pslist_reader_first_container(const str return (char *)first - offset; } -static inline void * +static __inline void * _pslist_reader_next_container(const struct pslist_entry *entry, const ptrdiff_t offset) { Index: src/sys/sys/rndsource.h diff -u src/sys/sys/rndsource.h:1.5 src/sys/sys/rndsource.h:1.6 --- src/sys/sys/rndsource.h:1.5 Tue Feb 16 19:43:43 2016 +++ src/sys/sys/rndsource.h Thu Apr 19 17:19:07 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: rndsource.h,v 1.5 2016/02/17 00:43:43 riastradh Exp $ */ +/* $NetBSD: rndsource.h,v 1.6 2018/04/19 21:19:07 christos Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ typedef struct krndsource { unsigned refcnt; } krndsource_t; -static inline void +static __inline void rndsource_setcb(struct krndsource *const rs, void (*const cb)(size_t, void *), void *const arg) { @@ -76,7 +76,7 @@ rndsource_setcb(struct krndsource *const rs->getarg = arg; } -static inline void +static __inline void rndsource_setenable(struct krndsource *const rs, void *const cb) { rs->enable = cb; @@ -95,7 +95,7 @@ void rnd_attach_source(krndsource_t *, uint32_t, uint32_t); void rnd_detach_source(krndsource_t *); -static inline void +static __inline void rnd_add_uint32(krndsource_t *kr, uint32_t val) { if (__predict_true(kr)) { @@ -107,7 +107,7 @@ rnd_add_uint32(krndsource_t *kr, uint32_ } } -static inline void +static __inline void rnd_add_uint64(krndsource_t *kr, uint64_t val) { if (__predict_true(kr)) { Index: src/sys/sys/signalvar.h diff -u src/sys/sys/signalvar.h:1.88 src/sys/sys/signalvar.h:1.89 --- src/sys/sys/signalvar.h:1.88 Fri Jan 6 17:53:17 2017 +++ src/sys/sys/signalvar.h Thu Apr 19 17:19:07 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: signalvar.h,v 1.88 2017/01/06 22:53:17 kamil Exp $ */ +/* $NetBSD: signalvar.h,v 1.89 2018/04/19 21:19:07 christos Exp $ */ /* * Copyright (c) 1991, 1993 @@ -195,7 +195,7 @@ extern int (*coredump_vec)(struct lwp *, * * Return the first signal in a signal set. */ -static inline int +static __inline int firstsig(const sigset_t *ss) { int sig; @@ -221,13 +221,13 @@ firstsig(const sigset_t *ss) return (0); } -static inline void +static __inline void ksiginfo_queue_init(ksiginfoq_t *kq) { TAILQ_INIT(kq); } -static inline void +static __inline void ksiginfo_queue_drain(ksiginfoq_t *kq) { if (!TAILQ_EMPTY(kq)) Index: src/sys/sys/sleepq.h diff -u src/sys/sys/sleepq.h:1.24 src/sys/sys/sleepq.h:1.25 --- src/sys/sys/sleepq.h:1.24 Sun Feb 8 14:39:09 2015 +++ src/sys/sys/sleepq.h Thu Apr 19 17:19:07 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: sleepq.h,v 1.24 2015/02/08 19:39:09 christos Exp $ */ +/* $NetBSD: sleepq.h,v 1.25 2018/04/19 21:19:07 christos Exp $ */ /*- * Copyright (c) 2002, 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc. @@ -80,7 +80,7 @@ extern sleeptab_t sleeptab; * * XXX This only exists because panic() is broken. */ -static inline bool +static __inline bool sleepq_dontsleep(lwp_t *l) { extern int cold; @@ -92,7 +92,7 @@ sleepq_dontsleep(lwp_t *l) * Find the correct sleep queue for the specified wait channel. This * acquires and holds the per-queue interlock. */ -static inline sleepq_t * +static __inline sleepq_t * sleeptab_lookup(sleeptab_t *st, wchan_t wchan, kmutex_t **mp) { sleepq_t *sq; @@ -103,7 +103,7 @@ sleeptab_lookup(sleeptab_t *st, wchan_t return sq; } -static inline kmutex_t * +static __inline kmutex_t * sleepq_hashlock(wchan_t wchan) { kmutex_t *mp; @@ -117,7 +117,7 @@ sleepq_hashlock(wchan_t wchan) * Prepare to block on a sleep queue, after which any interlock can be * safely released. */ -static inline void +static __inline void sleepq_enter(sleepq_t *sq, lwp_t *l, kmutex_t *mp) { Index: src/sys/sys/socket.h diff -u src/sys/sys/socket.h:1.123 src/sys/sys/socket.h:1.124 --- src/sys/sys/socket.h:1.123 Sat Jul 1 12:59:12 2017 +++ src/sys/sys/socket.h Thu Apr 19 17:19:07 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: socket.h,v 1.123 2017/07/01 16:59:12 christos Exp $ */ +/* $NetBSD: socket.h,v 1.124 2018/04/19 21:19:07 christos Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -618,7 +618,7 @@ struct cmsghdr { #define SHUT_RDWR 2 /* Disallow further sends/receives. */ #ifdef _KERNEL -static inline socklen_t +static __inline socklen_t sockaddr_getlen(const struct sockaddr *sa) { return sa->sa_len; Index: src/sys/sys/socketvar.h diff -u src/sys/sys/socketvar.h:1.151 src/sys/sys/socketvar.h:1.152 --- src/sys/sys/socketvar.h:1.151 Mon Mar 19 12:26:26 2018 +++ src/sys/sys/socketvar.h Thu Apr 19 17:19:07 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: socketvar.h,v 1.151 2018/03/19 16:26:26 roy Exp $ */ +/* $NetBSD: socketvar.h,v 1.152 2018/04/19 21:19:07 christos Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -389,7 +389,7 @@ int do_sys_accept(struct lwp *, int, str /* * Do we need to notify the other side when I/O is possible? */ -static inline int +static __inline int sb_notify(struct sockbuf *sb) { @@ -402,7 +402,7 @@ sb_notify(struct sockbuf *sb) * How much space is there in a socket buffer (so->so_snd or so->so_rcv)? * Since the fields are unsigned, detect overflow and return 0. */ -static inline u_long +static __inline u_long sbspace(const struct sockbuf *sb) { @@ -413,7 +413,7 @@ sbspace(const struct sockbuf *sb) } /* do we have to send all at once on a socket? */ -static inline int +static __inline int sosendallatonce(const struct socket *so) { @@ -421,7 +421,7 @@ sosendallatonce(const struct socket *so) } /* can we read something from so? */ -static inline int +static __inline int soreadable(const struct socket *so) { @@ -433,7 +433,7 @@ soreadable(const struct socket *so) } /* can we write something to so? */ -static inline int +static __inline int sowritable(const struct socket *so) { @@ -447,7 +447,7 @@ sowritable(const struct socket *so) } /* adjust counters in sb reflecting allocation of m */ -static inline void +static __inline void sballoc(struct sockbuf *sb, struct mbuf *m) { @@ -460,7 +460,7 @@ sballoc(struct sockbuf *sb, struct mbuf } /* adjust counters in sb reflecting freeing of m */ -static inline void +static __inline void sbfree(struct sockbuf *sb, struct mbuf *m) { @@ -472,7 +472,7 @@ sbfree(struct sockbuf *sb, struct mbuf * sb->sb_mbcnt -= m->m_ext.ext_size; } -static inline void +static __inline void sorwakeup(struct socket *so) { @@ -482,7 +482,7 @@ sorwakeup(struct socket *so) sowakeup(so, &so->so_rcv, POLL_IN); } -static inline void +static __inline void sowwakeup(struct socket *so) { @@ -492,7 +492,7 @@ sowwakeup(struct socket *so) sowakeup(so, &so->so_snd, POLL_OUT); } -static inline void +static __inline void solock(struct socket *so) { kmutex_t *lock; @@ -503,7 +503,7 @@ solock(struct socket *so) solockretry(so, lock); } -static inline void +static __inline void sounlock(struct socket *so) { Index: src/sys/sys/timevar.h diff -u src/sys/sys/timevar.h:1.37 src/sys/sys/timevar.h:1.38 --- src/sys/sys/timevar.h:1.37 Thu Dec 7 20:19:29 2017 +++ src/sys/sys/timevar.h Thu Apr 19 17:19:07 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: timevar.h,v 1.37 2017/12/08 01:19:29 christos Exp $ */ +/* $NetBSD: timevar.h,v 1.38 2018/04/19 21:19:07 christos Exp $ */ /* * Copyright (c) 2005, 2008 The NetBSD Foundation. @@ -190,13 +190,13 @@ bool time_wraps(struct timespec *, struc extern volatile time_t time_second; /* current second in the epoch */ extern volatile time_t time_uptime; /* system uptime in seconds */ -static inline time_t time_mono_to_wall(time_t t) +static __inline time_t time_mono_to_wall(time_t t) { return t - time_uptime + time_second; } -static inline time_t time_wall_to_mono(time_t t) +static __inline time_t time_wall_to_mono(time_t t) { return t - time_second + time_uptime; Index: src/sys/sys/vnode.h diff -u src/sys/sys/vnode.h:1.279 src/sys/sys/vnode.h:1.280 --- src/sys/sys/vnode.h:1.279 Mon Jan 8 22:31:13 2018 +++ src/sys/sys/vnode.h Thu Apr 19 17:19:07 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: vnode.h,v 1.279 2018/01/09 03:31:13 christos Exp $ */ +/* $NetBSD: vnode.h,v 1.280 2018/04/19 21:19:07 christos Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -550,7 +550,7 @@ void vn_ra_allocctx(struct vnode *); int vn_fifo_bypass(void *); #ifdef DIAGNOSTIC -static inline bool +static __inline bool vn_locked(struct vnode *_vp) { @@ -558,7 +558,7 @@ vn_locked(struct vnode *_vp) VOP_ISLOCKED(_vp) == LK_EXCLUSIVE; } -static inline bool +static __inline bool vn_anylocked(struct vnode *_vp) {