s/static inline/static __inline/g for consistency with other include

headers.
This commit is contained in:
christos 2018-04-19 21:19:07 +00:00
parent e73dfff6aa
commit 8f06c59281
21 changed files with 155 additions and 155 deletions

View File

@ -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. * Copyright (c) 2007 The NetBSD Foundation, Inc.
@ -42,13 +42,13 @@ struct bus_space_reservation {
typedef struct bus_space_reservation bus_space_reservation_t; 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) bus_space_reservation_size(bus_space_reservation_t *bsr)
{ {
return bsr->_bsr_size; 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_space_reservation_init(bus_space_reservation_t *bsr,
bus_addr_t addr, bus_size_t size) bus_addr_t addr, bus_size_t size)
{ {
@ -57,7 +57,7 @@ bus_space_reservation_init(bus_space_reservation_t *bsr,
return bsr; return bsr;
} }
static inline bus_addr_t static __inline bus_addr_t
bus_space_reservation_addr(bus_space_reservation_t *bsr) bus_space_reservation_addr(bus_space_reservation_t *bsr)
{ {
return bsr->_bsr_start; return bsr->_bsr_start;

View File

@ -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. * Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -45,7 +45,7 @@
#define POSIX_BASE_YEAR 1970 #define POSIX_BASE_YEAR 1970
/* Some handy functions */ /* Some handy functions */
static inline int static __inline int
days_in_month(int m) days_in_month(int m)
{ {
switch (m) { switch (m) {
@ -68,7 +68,7 @@ days_in_month(int m)
* ((year % 400) == 0) ) * ((year % 400) == 0) )
* It is otherwise equivalent. * It is otherwise equivalent.
*/ */
static inline int static __inline int
is_leap_year(uint64_t year) is_leap_year(uint64_t year)
{ {
if ((year & 3) != 0) if ((year & 3) != 0)
@ -80,7 +80,7 @@ is_leap_year(uint64_t year)
return __predict_false((year % 400) == 0); return __predict_false((year % 400) == 0);
} }
static inline int static __inline int
days_per_year(uint64_t year) days_per_year(uint64_t year)
{ {
return is_leap_year(year) ? DAYS_PER_LEAP_YEAR : DAYS_PER_COMMON_YEAR; return is_leap_year(year) ? DAYS_PER_LEAP_YEAR : DAYS_PER_COMMON_YEAR;

View File

@ -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. * Copyright (c) 2011-2013 The NetBSD Foundation, Inc.
@ -71,7 +71,7 @@ int cprng_strong_poll(cprng_strong_t *, int); /* XXX " */
extern cprng_strong_t *kern_cprng; extern cprng_strong_t *kern_cprng;
static inline uint32_t static __inline uint32_t
cprng_strong32(void) cprng_strong32(void)
{ {
uint32_t r; uint32_t r;
@ -79,7 +79,7 @@ cprng_strong32(void)
return r; return r;
} }
static inline uint64_t static __inline uint64_t
cprng_strong64(void) cprng_strong64(void)
{ {
uint64_t r; uint64_t r;
@ -87,7 +87,7 @@ cprng_strong64(void)
return r; return r;
} }
static inline unsigned int static __inline unsigned int
cprng_strong_strength(cprng_strong_t *c) cprng_strong_strength(cprng_strong_t *c)
{ {
return NIST_BLOCK_KEYLEN_BYTES; return NIST_BLOCK_KEYLEN_BYTES;

View File

@ -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, * Copyright (c) 2007 YAMAMOTO Takashi,
@ -108,13 +108,13 @@ extern struct cpu_info **cpu_infos;
extern kcpuset_t *kcpuset_attached; extern kcpuset_t *kcpuset_attached;
extern kcpuset_t *kcpuset_running; extern kcpuset_t *kcpuset_running;
static inline u_int static __inline u_int
cpu_index(const struct cpu_info *ci) cpu_index(const struct cpu_info *ci)
{ {
return ci->ci_index; return ci->ci_index;
} }
static inline char * static __inline char *
cpu_name(struct cpu_info *ci) cpu_name(struct cpu_info *ci)
{ {
return ci->ci_data.cpu_name; return ci->ci_data.cpu_name;

View File

@ -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 (jb@freebsd.org) * Copyright (c) 2007-2008 John Birrell (jb@freebsd.org)
@ -169,16 +169,16 @@ uint64_t dtrace_gethrestime(void);
* processes and lwps. * processes and lwps.
*/ */
static inline size_t kdtrace_proc_size(void); static __inline size_t kdtrace_proc_size(void);
static inline void kdtrace_proc_ctor(void *, struct proc *); static __inline void kdtrace_proc_ctor(void *, struct proc *);
static inline void kdtrace_proc_dtor(void *, struct proc *); static __inline void kdtrace_proc_dtor(void *, struct proc *);
static inline size_t kdtrace_thread_size(void); static __inline size_t kdtrace_thread_size(void);
static inline void kdtrace_thread_ctor(void *, struct lwp *); static __inline void kdtrace_thread_ctor(void *, struct lwp *);
static inline void kdtrace_thread_dtor(void *, struct lwp *); static __inline void kdtrace_thread_dtor(void *, struct lwp *);
/* Return the DTrace process data size compiled in the kernel hooks. */ /* Return the DTrace process data size compiled in the kernel hooks. */
static inline size_t static __inline size_t
kdtrace_proc_size(void) kdtrace_proc_size(void)
{ {
@ -186,14 +186,14 @@ kdtrace_proc_size(void)
} }
/* Return the DTrace thread data size compiled in the kernel hooks. */ /* Return the DTrace thread data size compiled in the kernel hooks. */
static inline size_t static __inline size_t
kdtrace_thread_size(void) kdtrace_thread_size(void)
{ {
return KDTRACE_THREAD_SIZE; return KDTRACE_THREAD_SIZE;
} }
static inline void static __inline void
kdtrace_proc_ctor(void *arg, struct proc *p) kdtrace_proc_ctor(void *arg, struct proc *p)
{ {
@ -202,7 +202,7 @@ kdtrace_proc_ctor(void *arg, struct proc *p)
#endif #endif
} }
static inline void static __inline void
kdtrace_proc_dtor(void *arg, struct proc *p) kdtrace_proc_dtor(void *arg, struct proc *p)
{ {
@ -214,7 +214,7 @@ kdtrace_proc_dtor(void *arg, struct proc *p)
#endif #endif
} }
static inline void static __inline void
kdtrace_thread_ctor(void *arg, struct lwp *l) kdtrace_thread_ctor(void *arg, struct lwp *l)
{ {
@ -223,7 +223,7 @@ kdtrace_thread_ctor(void *arg, struct lwp *l)
#endif #endif
} }
static inline void static __inline void
kdtrace_thread_dtor(void *arg, struct lwp *l) kdtrace_thread_dtor(void *arg, struct lwp *l)
{ {

View File

@ -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 * Not (c) 2007 Matthew Orgass
* This file is public domain, meaning anyone can make any use of part or all * 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(q) { &(q), &(q) }
#define GCQ_INIT_HEAD(head) { GCQ_INIT((head).hq) } #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) gcq_init(struct gcq *q)
{ {
q->q_next = q->q_prev = q; q->q_next = q->q_prev = q;
} }
__attribute__((nonnull, const, warn_unused_result, always_inline)) __attribute__((nonnull, const, warn_unused_result, always_inline))
static inline struct gcq * static __inline struct gcq *
gcq_q(struct gcq *q) gcq_q(struct gcq *q)
{ {
return q; return q;
} }
__attribute__((nonnull, const, warn_unused_result, always_inline)) __attribute__((nonnull, const, warn_unused_result, always_inline))
static inline struct gcq * static __inline struct gcq *
gcq_hq(struct gcq_head *head) gcq_hq(struct gcq_head *head)
{ {
return (struct gcq *)head; return (struct gcq *)head;
} }
__attribute__((nonnull, const, warn_unused_result, always_inline)) __attribute__((nonnull, const, warn_unused_result, always_inline))
static inline struct gcq_head * static __inline struct gcq_head *
gcq_head(struct gcq *q) gcq_head(struct gcq *q)
{ {
return (struct gcq_head *)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_head(struct gcq_head *head)
{ {
gcq_init(gcq_hq(head)); gcq_init(gcq_hq(head));
} }
__attribute__((nonnull, pure, warn_unused_result, always_inline)) __attribute__((nonnull, pure, warn_unused_result, always_inline))
static inline bool static __inline bool
gcq_onlist(struct gcq *q) gcq_onlist(struct gcq *q)
{ {
return (q->q_next != q); return (q->q_next != q);
} }
__attribute__((nonnull, pure, warn_unused_result, always_inline)) __attribute__((nonnull, pure, warn_unused_result, always_inline))
static inline bool static __inline bool
gcq_empty(struct gcq_head *head) gcq_empty(struct gcq_head *head)
{ {
return (!gcq_onlist(gcq_hq(head))); return (!gcq_onlist(gcq_hq(head)));
} }
__attribute__((nonnull, pure, warn_unused_result, always_inline)) __attribute__((nonnull, pure, warn_unused_result, always_inline))
static inline bool static __inline bool
gcq_linked(struct gcq *prev, struct gcq *next) gcq_linked(struct gcq *prev, struct gcq *next)
{ {
return (prev->q_next == next && next->q_prev == prev); 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) gcq_insert_after(struct gcq *on, struct gcq *off)
{ {
struct gcq *on_next; struct gcq *on_next;
@ -117,7 +117,7 @@ gcq_insert_after(struct gcq *on, struct gcq *off)
on->q_next = off; on->q_next = off;
} }
__attribute__((nonnull)) static inline void __attribute__((nonnull)) static __inline void
gcq_insert_before(struct gcq *on, struct gcq *off) gcq_insert_before(struct gcq *on, struct gcq *off)
{ {
struct gcq *on_prev; struct gcq *on_prev;
@ -130,19 +130,19 @@ gcq_insert_before(struct gcq *on, struct gcq *off)
on->q_prev = off; 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_head(struct gcq_head *head, struct gcq *q)
{ {
gcq_insert_after(gcq_hq(head), 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_tail(struct gcq_head *head, struct gcq *q)
{ {
gcq_insert_before(gcq_hq(head), 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) gcq_tie(struct gcq *dst, struct gcq *src)
{ {
struct gcq *dst_next, *src_prev; struct gcq *dst_next, *src_prev;
@ -155,20 +155,20 @@ gcq_tie(struct gcq *dst, struct gcq *src)
dst->q_next = 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_tie_after(struct gcq *dst, struct gcq *src)
{ {
GCQ_ASSERT(dst != src && dst->q_prev != src); GCQ_ASSERT(dst != src && dst->q_prev != src);
gcq_tie(dst, 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_before(struct gcq *dst, struct gcq *src)
{ {
gcq_tie_after(dst->q_prev, 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) gcq_remove(struct gcq *q)
{ {
struct gcq *next, *prev; struct gcq *next, *prev;
@ -182,7 +182,7 @@ gcq_remove(struct gcq *q)
} }
#ifdef GCQ_UNCONDITIONAL_MERGE #ifdef GCQ_UNCONDITIONAL_MERGE
__attribute__((nonnull)) static inline void __attribute__((nonnull)) static __inline void
gcq_merge(struct gcq *dst, struct gcq *src) gcq_merge(struct gcq *dst, struct gcq *src)
{ {
GCQ_ASSERT(dst != src && dst->q_prev != src); GCQ_ASSERT(dst != src && dst->q_prev != src);
@ -190,19 +190,19 @@ gcq_merge(struct gcq *dst, struct gcq *src)
gcq_tie(src, src); 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_head(struct gcq_head *dst, struct gcq_head *src)
{ {
gcq_merge(gcq_hq(dst), gcq_hq(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_tail(struct gcq_head *dst, struct gcq_head *src)
{ {
gcq_merge(gcq_hq(dst)->q_prev, gcq_hq(src)); gcq_merge(gcq_hq(dst)->q_prev, gcq_hq(src));
} }
#else #else
__attribute__((nonnull)) static inline void __attribute__((nonnull)) static __inline void
gcq_merge(struct gcq *dst, struct gcq *src) gcq_merge(struct gcq *dst, struct gcq *src)
{ {
struct gcq *dst_next, *src_prev, *src_next; struct gcq *dst_next, *src_prev, *src_next;
@ -221,20 +221,20 @@ gcq_merge(struct gcq *dst, struct gcq *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_head(struct gcq_head *dst, struct gcq_head *src)
{ {
gcq_merge(gcq_hq(dst), gcq_hq(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_tail(struct gcq_head *dst, struct gcq_head *src)
{ {
gcq_merge(gcq_hq(dst)->q_prev, gcq_hq(src)); gcq_merge(gcq_hq(dst)->q_prev, gcq_hq(src));
} }
#endif #endif
__attribute__((nonnull)) static inline void __attribute__((nonnull)) static __inline void
gcq_clear(struct gcq *q) gcq_clear(struct gcq *q)
{ {
struct gcq *nq, *next; struct gcq *nq, *next;
@ -246,13 +246,13 @@ gcq_clear(struct gcq *q)
} while (next != 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_remove_all(struct gcq_head *head)
{ {
gcq_clear(gcq_hq(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) _gcq_next(struct gcq *current, struct gcq_head *head, struct gcq *start)
{ {
struct gcq *q, *hq; struct gcq *q, *hq;
@ -265,7 +265,7 @@ _gcq_next(struct gcq *current, struct gcq_head *head, struct gcq *start)
return q; 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) _gcq_prev(struct gcq *current, struct gcq_head *head, struct gcq *start)
{ {
struct gcq *q, *hq; struct gcq *q, *hq;

View File

@ -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. * Copyright (c) 1997 Charles D. Cranor and Washington University.
@ -257,7 +257,7 @@ do { \
#define KERNHIST_DUMP(NAME) #define KERNHIST_DUMP(NAME)
#endif #endif
static inline void static __inline void
kernhist_entry_print(const struct kern_history_ent *e, void (*pr)(const char *, ...) __printflike(1, 2)) kernhist_entry_print(const struct kern_history_ent *e, void (*pr)(const char *, ...) __printflike(1, 2))
{ {
struct timeval tv; struct timeval tv;

View File

@ -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 * Copyright (c) 1988, 1993
@ -304,7 +304,7 @@ void ktr_execfd(int, u_int);
int ktrace_common(lwp_t *, int, int, int, file_t **); int ktrace_common(lwp_t *, int, int, int, file_t **);
static inline int static __inline int
ktrenter(lwp_t *l) ktrenter(lwp_t *l)
{ {
@ -314,118 +314,118 @@ ktrenter(lwp_t *l)
return 0; return 0;
} }
static inline void static __inline void
ktrexit(lwp_t *l) ktrexit(lwp_t *l)
{ {
l->l_pflag &= ~LP_KTRACTIVE; l->l_pflag &= ~LP_KTRACTIVE;
} }
static inline bool static __inline bool
ktrpoint(int fac) ktrpoint(int fac)
{ {
return __predict_false(ktrace_on) && __predict_false(ktr_point(1 << fac)); return __predict_false(ktrace_on) && __predict_false(ktr_point(1 << fac));
} }
static inline void static __inline void
ktrcsw(int a, int b) ktrcsw(int a, int b)
{ {
if (__predict_false(ktrace_on)) if (__predict_false(ktrace_on))
ktr_csw(a, b); ktr_csw(a, b);
} }
static inline void static __inline void
ktremul(void) ktremul(void)
{ {
if (__predict_false(ktrace_on)) if (__predict_false(ktrace_on))
ktr_emul(); ktr_emul();
} }
static inline void static __inline void
ktrgenio(int a, enum uio_rw b, const void *c, size_t d, int e) ktrgenio(int a, enum uio_rw b, const void *c, size_t d, int e)
{ {
if (__predict_false(ktrace_on)) if (__predict_false(ktrace_on))
ktr_genio(a, b, c, d, e); 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) ktrgeniov(int a, enum uio_rw b, struct iovec *c, int d, int e)
{ {
if (__predict_false(ktrace_on)) if (__predict_false(ktrace_on))
ktr_geniov(a, b, c, d, e); 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) ktrmibio(int a, enum uio_rw b, const void *c, size_t d, int e)
{ {
if (__predict_false(ktrace_on)) if (__predict_false(ktrace_on))
ktr_mibio(a, b, c, d, e); ktr_mibio(a, b, c, d, e);
} }
static inline void static __inline void
ktrnamei(const char *a, size_t b) ktrnamei(const char *a, size_t b)
{ {
if (__predict_false(ktrace_on)) if (__predict_false(ktrace_on))
ktr_namei(a, b); ktr_namei(a, b);
} }
static inline void static __inline void
ktrnamei2(const char *a, size_t b, const char *c, size_t d) ktrnamei2(const char *a, size_t b, const char *c, size_t d)
{ {
if (__predict_false(ktrace_on)) if (__predict_false(ktrace_on))
ktr_namei2(a, b, c, d); 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) ktrpsig(int a, sig_t b, const sigset_t *c, const ksiginfo_t * d)
{ {
if (__predict_false(ktrace_on)) if (__predict_false(ktrace_on))
ktr_psig(a, b, c, d); ktr_psig(a, b, c, d);
} }
static inline void static __inline void
ktrsyscall(register_t code, const register_t args[], int narg) ktrsyscall(register_t code, const register_t args[], int narg)
{ {
if (__predict_false(ktrace_on)) if (__predict_false(ktrace_on))
ktr_syscall(code, args, narg); ktr_syscall(code, args, narg);
} }
static inline void static __inline void
ktrsysret(register_t a, int b, register_t *c) ktrsysret(register_t a, int b, register_t *c)
{ {
if (__predict_false(ktrace_on)) if (__predict_false(ktrace_on))
ktr_sysret(a, b, c); ktr_sysret(a, b, c);
} }
static inline void static __inline void
ktrkuser(const char *a, const void *b, size_t c) ktrkuser(const char *a, const void *b, size_t c)
{ {
if (__predict_false(ktrace_on)) if (__predict_false(ktrace_on))
ktr_kuser(a, b, c); ktr_kuser(a, b, c);
} }
static inline void static __inline void
ktrmib(const int *a , u_int b) ktrmib(const int *a , u_int b)
{ {
if (__predict_false(ktrace_on)) if (__predict_false(ktrace_on))
ktr_mib(a, b); ktr_mib(a, b);
} }
static inline void static __inline void
ktrexecarg(const void *a, size_t b) ktrexecarg(const void *a, size_t b)
{ {
if (__predict_false(ktrace_on)) if (__predict_false(ktrace_on))
ktr_execarg(a, b); ktr_execarg(a, b);
} }
static inline void static __inline void
ktrexecenv(const void *a, size_t b) ktrexecenv(const void *a, size_t b)
{ {
if (__predict_false(ktrace_on)) if (__predict_false(ktrace_on))
ktr_execenv(a, b); ktr_execenv(a, b);
} }
static inline void static __inline void
ktrexecfd(int fd, u_int dtype) ktrexecfd(int fd, u_int dtype)
{ {
if (__predict_false(ktrace_on)) if (__predict_false(ktrace_on))

View File

@ -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 * Copyright (c) 2001, 2006, 2007, 2008, 2009, 2010
@ -51,7 +51,7 @@
#if defined(_KERNEL) #if defined(_KERNEL)
struct lwp; struct lwp;
/* forward declare this for <machine/cpu.h> so it can get l_cpu. */ /* 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 */ #include <machine/cpu.h> /* curcpu() and cpu_info */
#endif #endif
@ -291,7 +291,7 @@ extern int maxlwp __read_mostly; /* max number of lwps */
#define LSSUSPENDED 8 /* Not running, not signalable. */ #define LSSUSPENDED 8 /* Not running, not signalable. */
#if defined(_KERNEL) || defined(_KMEMUSER) #if defined(_KERNEL) || defined(_KMEMUSER)
static inline void * static __inline void *
lwp_getpcb(struct lwp *l) lwp_getpcb(struct lwp *l)
{ {
@ -366,7 +366,7 @@ void lwp_whatis(uintptr_t, void (*)(const char *, ...) __printflike(1, 2));
/* /*
* Lock an LWP. XXX _MODULE * Lock an LWP. XXX _MODULE
*/ */
static inline void static __inline void
lwp_lock(lwp_t *l) lwp_lock(lwp_t *l)
{ {
kmutex_t *old = l->l_mutex; kmutex_t *old = l->l_mutex;
@ -386,13 +386,13 @@ lwp_lock(lwp_t *l)
/* /*
* Unlock an LWP. XXX _MODULE * Unlock an LWP. XXX _MODULE
*/ */
static inline void static __inline void
lwp_unlock(lwp_t *l) lwp_unlock(lwp_t *l)
{ {
mutex_spin_exit(l->l_mutex); mutex_spin_exit(l->l_mutex);
} }
static inline void static __inline void
lwp_changepri(lwp_t *l, pri_t pri) lwp_changepri(lwp_t *l, pri_t pri)
{ {
KASSERT(mutex_owned(l->l_mutex)); KASSERT(mutex_owned(l->l_mutex));
@ -404,7 +404,7 @@ lwp_changepri(lwp_t *l, pri_t pri)
KASSERT(l->l_priority == pri); KASSERT(l->l_priority == pri);
} }
static inline void static __inline void
lwp_lendpri(lwp_t *l, pri_t pri) lwp_lendpri(lwp_t *l, pri_t pri)
{ {
KASSERT(mutex_owned(l->l_mutex)); KASSERT(mutex_owned(l->l_mutex));
@ -413,7 +413,7 @@ lwp_lendpri(lwp_t *l, pri_t pri)
KASSERT(l->l_inheritedprio == pri); KASSERT(l->l_inheritedprio == pri);
} }
static inline pri_t static __inline pri_t
lwp_eprio(lwp_t *l) lwp_eprio(lwp_t *l)
{ {
pri_t pri; pri_t pri;
@ -432,19 +432,19 @@ int lwp_create(lwp_t *, struct proc *, vaddr_t, int, void *, size_t,
* We should provide real stubs for the below that modules can use. * We should provide real stubs for the below that modules can use.
*/ */
static inline void static __inline void
spc_lock(struct cpu_info *ci) spc_lock(struct cpu_info *ci)
{ {
mutex_spin_enter(ci->ci_schedstate.spc_mutex); mutex_spin_enter(ci->ci_schedstate.spc_mutex);
} }
static inline void static __inline void
spc_unlock(struct cpu_info *ci) spc_unlock(struct cpu_info *ci)
{ {
mutex_spin_exit(ci->ci_schedstate.spc_mutex); mutex_spin_exit(ci->ci_schedstate.spc_mutex);
} }
static inline void static __inline void
spc_dlock(struct cpu_info *ci1, struct cpu_info *ci2) spc_dlock(struct cpu_info *ci1, struct cpu_info *ci2)
{ {
struct schedstate_percpu *spc1 = &ci1->ci_schedstate; struct schedstate_percpu *spc1 = &ci1->ci_schedstate;
@ -477,13 +477,13 @@ extern struct lwp *curlwp; /* Current running LWP */
* This provide a way for <machine/cpu.h> to get l_cpu for curlwp before * This provide a way for <machine/cpu.h> to get l_cpu for curlwp before
* struct lwp is defined. * struct lwp is defined.
*/ */
static inline struct cpu_info * static __inline struct cpu_info *
lwp_getcpu(struct lwp *l) lwp_getcpu(struct lwp *l)
{ {
return l->l_cpu; return l->l_cpu;
} }
static inline bool static __inline bool
CURCPU_IDLE_P(void) CURCPU_IDLE_P(void)
{ {
struct cpu_info *ci = curcpu(); struct cpu_info *ci = curcpu();
@ -496,7 +496,7 @@ CURCPU_IDLE_P(void)
* compiled as a module should use kpreempt_disable() and * compiled as a module should use kpreempt_disable() and
* kpreempt_enable(). * kpreempt_enable().
*/ */
static inline void static __inline void
KPREEMPT_DISABLE(lwp_t *l) KPREEMPT_DISABLE(lwp_t *l)
{ {
@ -505,7 +505,7 @@ KPREEMPT_DISABLE(lwp_t *l)
__insn_barrier(); __insn_barrier();
} }
static inline void static __inline void
KPREEMPT_ENABLE(lwp_t *l) 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 * curlwp_bindx. One use case is psref(9) that has a contract that
* forbids migrations. * forbids migrations.
*/ */
static inline int static __inline int
curlwp_bind(void) curlwp_bind(void)
{ {
int bound; int bound;
@ -541,7 +541,7 @@ curlwp_bind(void)
return bound; return bound;
} }
static inline void static __inline void
curlwp_bindx(int bound) curlwp_bindx(int bound)
{ {

View File

@ -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 * Copyright (c) 1981, 1984, 1993
@ -52,7 +52,7 @@ void initmsgbuf(void *, size_t);
void loginit(void); void loginit(void);
void logputchar(int); void logputchar(int);
static inline int static __inline int
logenabled(const struct kern_msgbuf *mbp) logenabled(const struct kern_msgbuf *mbp)
{ {
return msgbufenabled && mbp->msg_magic == MSG_MAGIC; return msgbufenabled && mbp->msg_magic == MSG_MAGIC;

View File

@ -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 <jmcneill@invisible.ca> * Copyright (c) 2007 Jared D. McNeill <jmcneill@invisible.ca>
@ -120,19 +120,19 @@ void pmf_qual_recursive_copy(pmf_qual_t *, const pmf_qual_t *);
void pmf_self_suspensor_init(device_t, device_suspensor_t *, void pmf_self_suspensor_init(device_t, device_suspensor_t *,
pmf_qual_t *); pmf_qual_t *);
static inline const device_suspensor_t * static __inline const device_suspensor_t *
pmf_qual_suspension(const pmf_qual_t *pq) pmf_qual_suspension(const pmf_qual_t *pq)
{ {
return pq->pq_suspensor; return pq->pq_suspensor;
} }
static inline devact_level_t static __inline devact_level_t
pmf_qual_depth(const pmf_qual_t *pq) pmf_qual_depth(const pmf_qual_t *pq)
{ {
return pq->pq_actlvl; return pq->pq_actlvl;
} }
static inline bool static __inline bool
pmf_qual_descend_ok(const pmf_qual_t *pq) pmf_qual_descend_ok(const pmf_qual_t *pq)
{ {
return pq->pq_actlvl == DEVACT_LEVEL_FULL; return pq->pq_actlvl == DEVACT_LEVEL_FULL;

View File

@ -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. * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@ -556,7 +556,7 @@ int proc_compare(const struct proc *, const struct lwp *,
int proclist_foreach_call(struct proclist *, int proclist_foreach_call(struct proclist *,
int (*)(struct proc *, void *arg), void *); int (*)(struct proc *, void *arg), void *);
static inline struct proc * static __inline struct proc *
_proclist_skipmarker(struct proc *p0) _proclist_skipmarker(struct proc *p0)
{ {
struct proc *p = p0; struct proc *p = p0;

View File

@ -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. * Copyright (c) 2016 The NetBSD Foundation, Inc.
@ -61,21 +61,21 @@ struct pslist_entry {
* excluding writers and readers. * excluding writers and readers.
*/ */
static inline void static __inline void
pslist_init(struct pslist_head *head) pslist_init(struct pslist_head *head)
{ {
head->plh_first = NULL; head->plh_first = NULL;
} }
static inline void static __inline void
pslist_destroy(struct pslist_head *head __diagused) pslist_destroy(struct pslist_head *head __diagused)
{ {
_PSLIST_ASSERT(head->plh_first == NULL); _PSLIST_ASSERT(head->plh_first == NULL);
} }
static inline void static __inline void
pslist_entry_init(struct pslist_entry *entry) pslist_entry_init(struct pslist_entry *entry)
{ {
@ -83,7 +83,7 @@ pslist_entry_init(struct pslist_entry *entry)
entry->ple_prevp = NULL; entry->ple_prevp = NULL;
} }
static inline void static __inline void
pslist_entry_destroy(struct pslist_entry *entry) pslist_entry_destroy(struct pslist_entry *entry)
{ {
@ -109,7 +109,7 @@ pslist_entry_destroy(struct pslist_entry *entry)
* memory barriers is inconsequential. * memory barriers is inconsequential.
*/ */
static inline void static __inline void
pslist_writer_insert_head(struct pslist_head *head, struct pslist_entry *new) pslist_writer_insert_head(struct pslist_head *head, struct pslist_entry *new)
{ {
@ -126,7 +126,7 @@ pslist_writer_insert_head(struct pslist_head *head, struct pslist_entry *new)
head->plh_first = new; head->plh_first = new;
} }
static inline void static __inline void
pslist_writer_insert_before(struct pslist_entry *entry, pslist_writer_insert_before(struct pslist_entry *entry,
struct pslist_entry *new) struct pslist_entry *new)
{ {
@ -144,7 +144,7 @@ pslist_writer_insert_before(struct pslist_entry *entry,
entry->ple_prevp = &new->ple_next; entry->ple_prevp = &new->ple_next;
} }
static inline void static __inline void
pslist_writer_insert_after(struct pslist_entry *entry, pslist_writer_insert_after(struct pslist_entry *entry,
struct pslist_entry *new) struct pslist_entry *new)
{ {
@ -163,7 +163,7 @@ pslist_writer_insert_after(struct pslist_entry *entry,
entry->ple_next = new; entry->ple_next = new;
} }
static inline void static __inline void
pslist_writer_remove(struct pslist_entry *entry) pslist_writer_remove(struct pslist_entry *entry)
{ {
@ -184,14 +184,14 @@ pslist_writer_remove(struct pslist_entry *entry)
*/ */
} }
static inline struct pslist_entry * static __inline struct pslist_entry *
pslist_writer_first(const struct pslist_head *head) pslist_writer_first(const struct pslist_head *head)
{ {
return head->plh_first; return head->plh_first;
} }
static inline struct pslist_entry * static __inline struct pslist_entry *
pslist_writer_next(const struct pslist_entry *entry) pslist_writer_next(const struct pslist_entry *entry)
{ {
@ -199,7 +199,7 @@ pslist_writer_next(const struct pslist_entry *entry)
return entry->ple_next; return entry->ple_next;
} }
static inline void * static __inline void *
_pslist_writer_first_container(const struct pslist_head *head, _pslist_writer_first_container(const struct pslist_head *head,
const ptrdiff_t offset) const ptrdiff_t offset)
{ {
@ -208,7 +208,7 @@ _pslist_writer_first_container(const struct pslist_head *head,
return (first == NULL ? NULL : (char *)first - offset); return (first == NULL ? NULL : (char *)first - offset);
} }
static inline void * static __inline void *
_pslist_writer_next_container(const struct pslist_entry *entry, _pslist_writer_next_container(const struct pslist_entry *entry,
const ptrdiff_t offset) const ptrdiff_t offset)
{ {
@ -225,7 +225,7 @@ _pslist_writer_next_container(const struct pslist_entry *entry,
* dereferencing the resulting pointer. * dereferencing the resulting pointer.
*/ */
static inline struct pslist_entry * static __inline struct pslist_entry *
pslist_reader_first(const struct pslist_head *head) pslist_reader_first(const struct pslist_head *head)
{ {
struct pslist_entry *first = head->plh_first; struct pslist_entry *first = head->plh_first;
@ -236,7 +236,7 @@ pslist_reader_first(const struct pslist_head *head)
return first; return first;
} }
static inline struct pslist_entry * static __inline struct pslist_entry *
pslist_reader_next(const struct pslist_entry *entry) pslist_reader_next(const struct pslist_entry *entry)
{ {
struct pslist_entry *next = entry->ple_next; struct pslist_entry *next = entry->ple_next;
@ -248,7 +248,7 @@ pslist_reader_next(const struct pslist_entry *entry)
return next; return next;
} }
static inline void * static __inline void *
_pslist_reader_first_container(const struct pslist_head *head, _pslist_reader_first_container(const struct pslist_head *head,
const ptrdiff_t offset) const ptrdiff_t offset)
{ {
@ -261,7 +261,7 @@ _pslist_reader_first_container(const struct pslist_head *head,
return (char *)first - offset; return (char *)first - offset;
} }
static inline void * static __inline void *
_pslist_reader_next_container(const struct pslist_entry *entry, _pslist_reader_next_container(const struct pslist_entry *entry,
const ptrdiff_t offset) const ptrdiff_t offset)
{ {

View File

@ -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. * Copyright (c) 1997 The NetBSD Foundation, Inc.
@ -68,7 +68,7 @@ typedef struct krndsource {
unsigned refcnt; unsigned refcnt;
} krndsource_t; } krndsource_t;
static inline void static __inline void
rndsource_setcb(struct krndsource *const rs, void (*const cb)(size_t, void *), rndsource_setcb(struct krndsource *const rs, void (*const cb)(size_t, void *),
void *const arg) void *const arg)
{ {
@ -76,7 +76,7 @@ rndsource_setcb(struct krndsource *const rs, void (*const cb)(size_t, void *),
rs->getarg = arg; rs->getarg = arg;
} }
static inline void static __inline void
rndsource_setenable(struct krndsource *const rs, void *const cb) rndsource_setenable(struct krndsource *const rs, void *const cb)
{ {
rs->enable = cb; rs->enable = cb;
@ -95,7 +95,7 @@ void rnd_attach_source(krndsource_t *, const char *,
uint32_t, uint32_t); uint32_t, uint32_t);
void rnd_detach_source(krndsource_t *); void rnd_detach_source(krndsource_t *);
static inline void static __inline void
rnd_add_uint32(krndsource_t *kr, uint32_t val) rnd_add_uint32(krndsource_t *kr, uint32_t val)
{ {
if (__predict_true(kr)) { if (__predict_true(kr)) {
@ -107,7 +107,7 @@ rnd_add_uint32(krndsource_t *kr, uint32_t val)
} }
} }
static inline void static __inline void
rnd_add_uint64(krndsource_t *kr, uint64_t val) rnd_add_uint64(krndsource_t *kr, uint64_t val)
{ {
if (__predict_true(kr)) { if (__predict_true(kr)) {

View File

@ -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 * Copyright (c) 1991, 1993
@ -195,7 +195,7 @@ extern int (*coredump_vec)(struct lwp *, const char *);
* *
* Return the first signal in a signal set. * Return the first signal in a signal set.
*/ */
static inline int static __inline int
firstsig(const sigset_t *ss) firstsig(const sigset_t *ss)
{ {
int sig; int sig;
@ -221,13 +221,13 @@ firstsig(const sigset_t *ss)
return (0); return (0);
} }
static inline void static __inline void
ksiginfo_queue_init(ksiginfoq_t *kq) ksiginfo_queue_init(ksiginfoq_t *kq)
{ {
TAILQ_INIT(kq); TAILQ_INIT(kq);
} }
static inline void static __inline void
ksiginfo_queue_drain(ksiginfoq_t *kq) ksiginfo_queue_drain(ksiginfoq_t *kq)
{ {
if (!TAILQ_EMPTY(kq)) if (!TAILQ_EMPTY(kq))

View File

@ -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. * 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. * XXX This only exists because panic() is broken.
*/ */
static inline bool static __inline bool
sleepq_dontsleep(lwp_t *l) sleepq_dontsleep(lwp_t *l)
{ {
extern int cold; extern int cold;
@ -92,7 +92,7 @@ sleepq_dontsleep(lwp_t *l)
* Find the correct sleep queue for the specified wait channel. This * Find the correct sleep queue for the specified wait channel. This
* acquires and holds the per-queue interlock. * 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) sleeptab_lookup(sleeptab_t *st, wchan_t wchan, kmutex_t **mp)
{ {
sleepq_t *sq; sleepq_t *sq;
@ -103,7 +103,7 @@ sleeptab_lookup(sleeptab_t *st, wchan_t wchan, kmutex_t **mp)
return sq; return sq;
} }
static inline kmutex_t * static __inline kmutex_t *
sleepq_hashlock(wchan_t wchan) sleepq_hashlock(wchan_t wchan)
{ {
kmutex_t *mp; 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 * Prepare to block on a sleep queue, after which any interlock can be
* safely released. * safely released.
*/ */
static inline void static __inline void
sleepq_enter(sleepq_t *sq, lwp_t *l, kmutex_t *mp) sleepq_enter(sleepq_t *sq, lwp_t *l, kmutex_t *mp)
{ {

View File

@ -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. * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -618,7 +618,7 @@ struct cmsghdr {
#define SHUT_RDWR 2 /* Disallow further sends/receives. */ #define SHUT_RDWR 2 /* Disallow further sends/receives. */
#ifdef _KERNEL #ifdef _KERNEL
static inline socklen_t static __inline socklen_t
sockaddr_getlen(const struct sockaddr *sa) sockaddr_getlen(const struct sockaddr *sa)
{ {
return sa->sa_len; return sa->sa_len;

View File

@ -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. * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@ -389,7 +389,7 @@ int do_sys_accept(struct lwp *, int, struct sockaddr *, register_t *,
/* /*
* Do we need to notify the other side when I/O is possible? * Do we need to notify the other side when I/O is possible?
*/ */
static inline int static __inline int
sb_notify(struct sockbuf *sb) 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)? * 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. * Since the fields are unsigned, detect overflow and return 0.
*/ */
static inline u_long static __inline u_long
sbspace(const struct sockbuf *sb) 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? */ /* do we have to send all at once on a socket? */
static inline int static __inline int
sosendallatonce(const struct socket *so) sosendallatonce(const struct socket *so)
{ {
@ -421,7 +421,7 @@ sosendallatonce(const struct socket *so)
} }
/* can we read something from so? */ /* can we read something from so? */
static inline int static __inline int
soreadable(const struct socket *so) soreadable(const struct socket *so)
{ {
@ -433,7 +433,7 @@ soreadable(const struct socket *so)
} }
/* can we write something to so? */ /* can we write something to so? */
static inline int static __inline int
sowritable(const struct socket *so) sowritable(const struct socket *so)
{ {
@ -447,7 +447,7 @@ sowritable(const struct socket *so)
} }
/* adjust counters in sb reflecting allocation of m */ /* adjust counters in sb reflecting allocation of m */
static inline void static __inline void
sballoc(struct sockbuf *sb, struct mbuf *m) sballoc(struct sockbuf *sb, struct mbuf *m)
{ {
@ -460,7 +460,7 @@ sballoc(struct sockbuf *sb, struct mbuf *m)
} }
/* adjust counters in sb reflecting freeing of m */ /* adjust counters in sb reflecting freeing of m */
static inline void static __inline void
sbfree(struct sockbuf *sb, struct mbuf *m) sbfree(struct sockbuf *sb, struct mbuf *m)
{ {
@ -472,7 +472,7 @@ sbfree(struct sockbuf *sb, struct mbuf *m)
sb->sb_mbcnt -= m->m_ext.ext_size; sb->sb_mbcnt -= m->m_ext.ext_size;
} }
static inline void static __inline void
sorwakeup(struct socket *so) sorwakeup(struct socket *so)
{ {
@ -482,7 +482,7 @@ sorwakeup(struct socket *so)
sowakeup(so, &so->so_rcv, POLL_IN); sowakeup(so, &so->so_rcv, POLL_IN);
} }
static inline void static __inline void
sowwakeup(struct socket *so) sowwakeup(struct socket *so)
{ {
@ -492,7 +492,7 @@ sowwakeup(struct socket *so)
sowakeup(so, &so->so_snd, POLL_OUT); sowakeup(so, &so->so_snd, POLL_OUT);
} }
static inline void static __inline void
solock(struct socket *so) solock(struct socket *so)
{ {
kmutex_t *lock; kmutex_t *lock;
@ -503,7 +503,7 @@ solock(struct socket *so)
solockretry(so, lock); solockretry(so, lock);
} }
static inline void static __inline void
sounlock(struct socket *so) sounlock(struct socket *so)
{ {

View File

@ -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. * 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_establish(const struct emul *, const struct syscall_package *);
int syscall_disestablish(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, sy_call(const struct sysent *sy, struct lwp *l, const void *uap,
register_t *rval) register_t *rval)
{ {
@ -68,7 +68,7 @@ sy_call(const struct sysent *sy, struct lwp *l, const void *uap,
return error; return error;
} }
static inline int static __inline int
sy_invoke(const struct sysent *sy, struct lwp *l, const void *uap, sy_invoke(const struct sysent *sy, struct lwp *l, const void *uap,
register_t *rval, int code) register_t *rval, int code)
{ {

View File

@ -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. * Copyright (c) 2005, 2008 The NetBSD Foundation.
@ -190,13 +190,13 @@ bool time_wraps(struct timespec *, struct timespec *);
extern volatile time_t time_second; /* current second in the epoch */ extern volatile time_t time_second; /* current second in the epoch */
extern volatile time_t time_uptime; /* system uptime in seconds */ 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; 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; return t - time_second + time_uptime;

View File

@ -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. * Copyright (c) 2008 The NetBSD Foundation, Inc.
@ -550,7 +550,7 @@ void vn_ra_allocctx(struct vnode *);
int vn_fifo_bypass(void *); int vn_fifo_bypass(void *);
#ifdef DIAGNOSTIC #ifdef DIAGNOSTIC
static inline bool static __inline bool
vn_locked(struct vnode *_vp) vn_locked(struct vnode *_vp)
{ {
@ -558,7 +558,7 @@ vn_locked(struct vnode *_vp)
VOP_ISLOCKED(_vp) == LK_EXCLUSIVE; VOP_ISLOCKED(_vp) == LK_EXCLUSIVE;
} }
static inline bool static __inline bool
vn_anylocked(struct vnode *_vp) vn_anylocked(struct vnode *_vp)
{ {