Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sun68k/include mark bus functions as static inline, ...



details:   https://anonhg.NetBSD.org/src/rev/514380a17aec
branches:  trunk
changeset: 767227:514380a17aec
user:      mrg <mrg%NetBSD.org@localhost>
date:      Tue Jul 12 05:31:49 2011 +0000

description:
mark bus functions as static inline, not just plain inline.

diffstat:

 sys/arch/sun68k/include/bus.h |  135 ++++++++++++-----------------------------
 1 files changed, 39 insertions(+), 96 deletions(-)

diffs (truncated from 403 to 300 lines):

diff -r 360fab3ab614 -r 514380a17aec sys/arch/sun68k/include/bus.h
--- a/sys/arch/sun68k/include/bus.h     Tue Jul 12 05:31:03 2011 +0000
+++ b/sys/arch/sun68k/include/bus.h     Tue Jul 12 05:31:49 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bus.h,v 1.17 2008/07/01 15:14:32 tsutsui Exp $ */
+/*     $NetBSD: bus.h,v 1.18 2011/07/12 05:31:49 mrg Exp $     */
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -235,68 +235,68 @@
                t = t->parent;          \
        return (*(t)->f)
 
-__inline int
+static __inline int
 bus_space_map(bus_space_tag_t t, bus_addr_t a, bus_size_t s, int f,
     bus_space_handle_t *hp)
 {
        _BS_CALL(t, sun68k_bus_map)((t), 0, (a), (s), (f), 0, (hp));
 }
 
-__inline int
+static __inline int
 bus_space_map2(bus_space_tag_t t, bus_type_t bt, bus_addr_t a, bus_size_t s,
     int f, vaddr_t v, bus_space_handle_t *hp)
 {
        _BS_CALL(t, sun68k_bus_map)(t, bt, a, s, f, v, hp);
 }
 
-__inline int
+static __inline int
 bus_space_unmap(bus_space_tag_t t, bus_space_handle_t h, bus_size_t s)
 {
        _BS_CALL(t, sun68k_bus_unmap)(t, h, s);
 }
 
-__inline int
+static __inline int
 bus_space_subregion(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
     bus_size_t s, bus_space_handle_t *hp)
 {
        _BS_CALL(t, sun68k_bus_subregion)(t, h, o, s, hp);
 }
 
-__inline paddr_t
+static __inline paddr_t
 bus_space_mmap(bus_space_tag_t t, bus_addr_t a, off_t o, int p, int f)
 {
        _BS_CALL(t, sun68k_bus_mmap)(t, 0, a, o, p, f);
 }
 
-__inline paddr_t
+static __inline paddr_t
 bus_space_mmap2(bus_space_tag_t        t, bus_type_t bt, bus_addr_t a, off_t o, int p,
     int f)
 {
        _BS_CALL(t, sun68k_bus_mmap)(t, bt, a, o, p, f);
 }
 
-__inline void *
+static __inline void *
 bus_intr_establish(bus_space_tag_t t, int p, int l, int f, int (*h)(void *),
     void *a)
 {
        _BS_CALL(t, sun68k_intr_establish)(t, p, l, f, h, a);
 }
 
-__inline void
+static __inline void
 bus_space_barrier(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
     bus_size_t s, int f)
 {
        _BS_CALL(t, sun68k_bus_barrier)(t, h, o, s, f);
 }
 
-__inline int
+static __inline int
 _bus_space_peek(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, size_t s,
     void *vp)
 {
        _BS_CALL(t, sun68k_bus_peek)(t, h, o, s, vp);
 }
 
-__inline int
+static __inline int
 _bus_space_poke(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, size_t s,
     uint32_t v)
 {
@@ -432,16 +432,7 @@
  * described by tag/handle/offset and copy into buffer provided.
  */
 
-void bus_space_read_multi_1(bus_space_tag_t, bus_space_handle_t, bus_size_t,
-                           uint8_t *, bus_size_t);
-void bus_space_read_multi_2(bus_space_tag_t, bus_space_handle_t, bus_size_t,
-                           uint16_t *, bus_size_t);
-void bus_space_read_multi_4(bus_space_tag_t, bus_space_handle_t, bus_size_t,
-                           uint32_t *, bus_size_t);
-void bus_space_read_multi_8(bus_space_tag_t, bus_space_handle_t, bus_size_t,
-                           uint64_t *, bus_size_t);
-
-extern __inline void
+static __inline void
 bus_space_read_multi_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
     uint8_t *a, bus_size_t c)
 {
@@ -452,7 +443,7 @@
                *a++ = *p;
 }
 
-extern __inline void
+static __inline void
 bus_space_read_multi_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
     uint16_t *a, bus_size_t c)
 {
@@ -463,7 +454,7 @@
                *a++ = *p;
 }
 
-extern __inline void
+static __inline void
 bus_space_read_multi_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
     uint32_t *a, bus_size_t c)
 {
@@ -474,7 +465,7 @@
                *a++ = *p;
 }
 
-extern __inline void
+static __inline void
 bus_space_read_multi_8(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
     uint64_t *a, bus_size_t c)
 {
@@ -494,16 +485,8 @@
  * Write `count' 1, 2, 4, or 8 byte quantities from the buffer
  * provided to bus space described by tag/handle/offset.
  */
-void bus_space_write_multi_1(bus_space_tag_t, bus_space_handle_t, bus_size_t,
-                            const uint8_t *, bus_size_t);
-void bus_space_write_multi_2(bus_space_tag_t, bus_space_handle_t, bus_size_t,
-                            const uint16_t *, bus_size_t);
-void bus_space_write_multi_4(bus_space_tag_t, bus_space_handle_t, bus_size_t,
-                            const uint32_t *, bus_size_t);
-void bus_space_write_multi_8(bus_space_tag_t, bus_space_handle_t, bus_size_t,
-                            const uint64_t *, bus_size_t);
 
-extern __inline void
+static __inline void
 bus_space_write_multi_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
     const uint8_t *a, bus_size_t c)
 {
@@ -514,7 +497,7 @@
                *p = *a++;
 }
 
-extern __inline void
+static __inline void
 bus_space_write_multi_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
     const uint16_t *a, bus_size_t c)
 {
@@ -525,7 +508,7 @@
                *p = *a++;
 }
 
-extern __inline void
+static __inline void
 bus_space_write_multi_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
     const uint32_t *a, bus_size_t c)
 {
@@ -536,7 +519,7 @@
                *p = *a++;
 }
 
-extern __inline void
+static __inline void
 bus_space_write_multi_8(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
     const uint64_t *a, bus_size_t c)
 {
@@ -555,16 +538,8 @@
  * Write the 1, 2, 4, or 8 byte value `val' to bus space described
  * by tag/handle/offset `count' times.
  */
-void bus_space_set_multi_1(bus_space_tag_t, bus_space_handle_t, bus_size_t,
-                          const uint8_t, bus_size_t);
-void bus_space_set_multi_2(bus_space_tag_t, bus_space_handle_t, bus_size_t,
-                          const uint16_t, bus_size_t);
-void bus_space_set_multi_4(bus_space_tag_t, bus_space_handle_t, bus_size_t,
-                          const uint32_t, bus_size_t);
-void bus_space_set_multi_8(bus_space_tag_t, bus_space_handle_t, bus_size_t,
-                          const uint64_t, bus_size_t);
 
-extern __inline void
+static __inline void
 bus_space_set_multi_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
     const uint8_t v, bus_size_t c)
 {
@@ -575,7 +550,7 @@
                *p = v;
 }
 
-extern __inline void
+static __inline void
 bus_space_set_multi_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
     const uint16_t v, bus_size_t c)
 {
@@ -586,7 +561,7 @@
                *p = v;
 }
 
-extern __inline void
+static __inline void
 bus_space_set_multi_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
     const uint32_t v, bus_size_t c)
 {
@@ -597,7 +572,7 @@
                *p = v;
 }
 
-extern __inline void
+static __inline void
 bus_space_set_multi_8(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
     const uint64_t v, bus_size_t c)
 {
@@ -615,16 +590,8 @@
  *         uintN_t *addr, bus_size_t count);
  *
  */
-void bus_space_read_region_1(bus_space_tag_t, bus_space_handle_t, bus_size_t,
-                            uint8_t *, bus_size_t);
-void bus_space_read_region_2(bus_space_tag_t, bus_space_handle_t, bus_size_t,
-                            uint16_t *, bus_size_t);
-void bus_space_read_region_4(bus_space_tag_t, bus_space_handle_t, bus_size_t,
-                            uint32_t *, bus_size_t);
-void bus_space_read_region_8(bus_space_tag_t, bus_space_handle_t, bus_size_t,
-                            uint64_t *, bus_size_t);
 
-extern __inline void
+static __inline void
 bus_space_read_region_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
     uint8_t *a, bus_size_t c)
 {
@@ -634,7 +601,7 @@
        while (c-- > 0)
                *a++ = *p++;
 }
-extern __inline void
+static __inline void
 bus_space_read_region_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
     uint16_t *a, bus_size_t c)
 {
@@ -644,7 +611,7 @@
        while (c-- > 0)
                *a++ = *p++;
 }
-extern __inline void
+static __inline void
 bus_space_read_region_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
     uint32_t *a, bus_size_t c)
 {
@@ -654,7 +621,7 @@
        while (c-- > 0)
                *a++ = *p++;
 }
-extern __inline void
+static __inline void
 bus_space_read_region_8(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
     uint64_t *a, bus_size_t c)
 {
@@ -671,16 +638,8 @@
  *         uintN_t *addr, bus_size_t count);
  *
  */
-void bus_space_write_region_1(bus_space_tag_t, bus_space_handle_t, bus_size_t,
-                             const uint8_t *, bus_size_t);
-void bus_space_write_region_2(bus_space_tag_t, bus_space_handle_t, bus_size_t,
-                             const uint16_t *, bus_size_t);
-void bus_space_write_region_4(bus_space_tag_t, bus_space_handle_t, bus_size_t,
-                             const uint32_t *, bus_size_t);
-void bus_space_write_region_8(bus_space_tag_t, bus_space_handle_t, bus_size_t,
-                             const uint64_t *, bus_size_t);
 
-extern __inline void
+static __inline void
 bus_space_write_region_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
     const uint8_t *a, bus_size_t c)
 {
@@ -691,7 +650,7 @@
                *p++ = *a++;
 }
 
-extern __inline void
+static __inline void
 bus_space_write_region_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
     const uint16_t *a, bus_size_t c)
 {
@@ -702,7 +661,7 @@
                *p++ = *a++;
 }
 
-extern __inline void



Home | Main Index | Thread Index | Old Index