summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2007-12-09 21:00:36 +0000
committeralc <alc@FreeBSD.org>2007-12-09 21:00:36 +0000
commitfed3c18cd6fa4171579d82ead0bd41cc2cef00a7 (patch)
treefaa7fde653dc7fa7ba1ef87ea5855f90056ccfd1
parentec6292aa688d65f01dbb14cd111ae9d97bf1f9c0 (diff)
downloadFreeBSD-src-fed3c18cd6fa4171579d82ead0bd41cc2cef00a7.zip
FreeBSD-src-fed3c18cd6fa4171579d82ead0bd41cc2cef00a7.tar.gz
Eliminate compilation warnings due to the use of non-static inlines
through the introduction and use of the __gnu89_inline attribute. Submitted by: bde (i386) MFC after: 3 days
-rw-r--r--sys/amd64/amd64/pmap.c6
-rw-r--r--sys/conf/files.amd642
-rw-r--r--sys/conf/files.i3862
-rw-r--r--sys/i386/i386/pmap.c6
-rw-r--r--sys/sys/cdefs.h6
5 files changed, 14 insertions, 8 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
index 40c710c..e0c5e9a 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -154,7 +154,7 @@ __FBSDID("$FreeBSD$");
#endif
#if !defined(PMAP_DIAGNOSTIC)
-#define PMAP_INLINE __inline
+#define PMAP_INLINE __gnu89_inline
#else
#define PMAP_INLINE
#endif
@@ -1094,7 +1094,7 @@ pmap_qremove(vm_offset_t sva, int count)
/***************************************************
* Page table page management routines.....
***************************************************/
-static PMAP_INLINE void
+static __inline void
pmap_free_zero_pages(vm_page_t free)
{
vm_page_t m;
@@ -1110,7 +1110,7 @@ pmap_free_zero_pages(vm_page_t free)
* This routine unholds page table pages, and if the hold count
* drops to zero, then it decrements the wire count.
*/
-static PMAP_INLINE int
+static __inline int
pmap_unwire_pte_hold(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_page_t *free)
{
diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64
index 8276f85..5ae4fa1 100644
--- a/sys/conf/files.amd64
+++ b/sys/conf/files.amd64
@@ -116,7 +116,7 @@ amd64/amd64/mptable.c optional mptable
amd64/amd64/mptable_pci.c optional mptable pci
amd64/amd64/msi.c optional pci
amd64/amd64/nexus.c standard
-amd64/amd64/pmap.c standard nowerror
+amd64/amd64/pmap.c standard
amd64/amd64/prof_machdep.c optional profiling-routine
amd64/amd64/sigtramp.S standard
amd64/amd64/stack_machdep.c optional ddb | stack
diff --git a/sys/conf/files.i386 b/sys/conf/files.i386
index 9e43eca..ec47196 100644
--- a/sys/conf/files.i386
+++ b/sys/conf/files.i386
@@ -306,7 +306,7 @@ i386/i386/mptable_pci.c optional apic pci
i386/i386/msi.c optional apic pci
i386/i386/nexus.c standard
i386/i386/perfmon.c optional perfmon
-i386/i386/pmap.c standard nowerror
+i386/i386/pmap.c standard
i386/i386/ptrace_machdep.c standard
i386/i386/stack_machdep.c optional ddb | stack
i386/i386/support.s standard
diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c
index 662f97f..fb46c35 100644
--- a/sys/i386/i386/pmap.c
+++ b/sys/i386/i386/pmap.c
@@ -163,7 +163,7 @@ __FBSDID("$FreeBSD$");
#endif
#if !defined(PMAP_DIAGNOSTIC)
-#define PMAP_INLINE __inline
+#define PMAP_INLINE __gnu89_inline
#else
#define PMAP_INLINE
#endif
@@ -1144,7 +1144,7 @@ pmap_qremove(vm_offset_t sva, int count)
/***************************************************
* Page table page management routines.....
***************************************************/
-static PMAP_INLINE void
+static __inline void
pmap_free_zero_pages(vm_page_t free)
{
vm_page_t m;
@@ -1160,7 +1160,7 @@ pmap_free_zero_pages(vm_page_t free)
* This routine unholds page table pages, and if the hold count
* drops to zero, then it decrements the wire count.
*/
-static PMAP_INLINE int
+static __inline int
pmap_unwire_pte_hold(pmap_t pmap, vm_page_t m, vm_page_t *free)
{
diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h
index d7dff1f..5a2564b 100644
--- a/sys/sys/cdefs.h
+++ b/sys/sys/cdefs.h
@@ -235,6 +235,12 @@
#define __always_inline
#endif
+#if __GNUC_PREREQ__(4, 2) /* actually 4.1.3 */
+#define __gnu89_inline __attribute__((__gnu_inline__)) __inline
+#else
+#define __gnu89_inline
+#endif
+
#if __GNUC_PREREQ__(3, 3)
#define __nonnull(x) __attribute__((__nonnull__(x)))
#else
OpenPOWER on IntegriCloud