blob: 26867085739b5fa5777f71bf7d14f139b7babed7 [file] [log] [blame] [raw]
Fix gcc(1) warning 'always_inline function might not be inlinable'.
diff -ru --exclude-from freebsd-src-diff-exclude-names /usr/src/sys/contrib/xz-embedded/linux/lib/xz/xz_dec_lzma2.c freebsd-11.1/usr/src/sys/contrib/xz-embedded/linux/lib/xz/xz_dec_lzma2.c
--- /usr/src/sys/contrib/xz-embedded/linux/lib/xz/xz_dec_lzma2.c 2017-07-21 07:41:58.000000000 +0800
+++ freebsd-11.1/usr/src/sys/contrib/xz-embedded/linux/lib/xz/xz_dec_lzma2.c 2019-03-22 23:13:29.656616000 +0800
@@ -475,7 +475,7 @@
}
/* Read the next input byte if needed. */
-static __always_inline void rc_normalize(struct rc_dec *rc)
+static inline __always_inline void rc_normalize(struct rc_dec *rc)
{
if (rc->range < RC_TOP_VALUE) {
rc->range <<= RC_SHIFT_BITS;
@@ -494,7 +494,7 @@
* of the code generated by GCC 3.x decreases 10-15 %. (GCC 4.3 doesn't care,
* and it generates 10-20 % faster code than GCC 3.x from this file anyway.)
*/
-static __always_inline int rc_bit(struct rc_dec *rc, uint16_t *prob)
+static inline __always_inline int rc_bit(struct rc_dec *rc, uint16_t *prob)
{
uint32_t bound;
int bit;
@@ -516,7 +516,7 @@
}
/* Decode a bittree starting from the most significant bit. */
-static __always_inline uint32_t rc_bittree(struct rc_dec *rc,
+static inline __always_inline uint32_t rc_bittree(struct rc_dec *rc,
uint16_t *probs, uint32_t limit)
{
uint32_t symbol = 1;
@@ -532,7 +532,7 @@
}
/* Decode a bittree starting from the least significant bit. */
-static __always_inline void rc_bittree_reverse(struct rc_dec *rc,
+static inline __always_inline void rc_bittree_reverse(struct rc_dec *rc,
uint16_t *probs,
uint32_t *dest, uint32_t limit)
{
diff -ru --exclude-from freebsd-src-diff-exclude-names /usr/src/sys/kern/kern_lock.c freebsd-11.1/usr/src/sys/kern/kern_lock.c
--- /usr/src/sys/kern/kern_lock.c 2017-07-21 07:41:54.000000000 +0800
+++ freebsd-11.1/usr/src/sys/kern/kern_lock.c 2019-03-23 12:34:54.062104000 +0800
@@ -168,9 +168,9 @@
SYSCTL_UINT(_debug_lockmgr, OID_AUTO, loops, CTLFLAG_RW, &alk_loops, 0, "");
#endif
-static bool __always_inline lockmgr_slock_try(struct lock *lk, uintptr_t *xp,
+static inline bool __always_inline lockmgr_slock_try(struct lock *lk, uintptr_t *xp,
int flags);
-static bool __always_inline lockmgr_sunlock_try(struct lock *lk, uintptr_t x);
+static inline bool __always_inline lockmgr_sunlock_try(struct lock *lk, uintptr_t x);
static void
lockmgr_note_shared_acquire(struct lock *lk, int contested,
@@ -488,7 +488,7 @@
lock_destroy(&lk->lock_object);
}
-static bool __always_inline
+static inline bool __always_inline
lockmgr_slock_try(struct lock *lk, uintptr_t *xp, int flags)
{
@@ -509,7 +509,7 @@
return (false);
}
-static bool __always_inline
+static inline bool __always_inline
lockmgr_sunlock_try(struct lock *lk, uintptr_t x)
{
diff -ru --exclude-from freebsd-src-diff-exclude-names /usr/src/sys/kern/kern_rwlock.c freebsd-11.1/usr/src/sys/kern/kern_rwlock.c
--- /usr/src/sys/kern/kern_rwlock.c 2017-07-21 07:41:54.000000000 +0800
+++ freebsd-11.1/usr/src/sys/kern/kern_rwlock.c 2019-03-23 12:36:25.538838000 +0800
@@ -376,7 +376,7 @@
(RW_LOCK_READ | RW_LOCK_WRITE_WAITERS | RW_LOCK_WRITE_SPINNER)) == \
RW_LOCK_READ)
-static bool __always_inline
+static inline bool __always_inline
__rw_rlock_try(struct rwlock *rw, struct thread *td, uintptr_t *vp,
const char *file, int line)
{
@@ -674,7 +674,7 @@
return (0);
}
-static bool __always_inline
+static inline bool __always_inline
__rw_runlock_try(struct rwlock *rw, struct thread *td, uintptr_t *vp)
{
diff -ru --exclude-from freebsd-src-diff-exclude-names /usr/src/sys/kern/kern_sx.c freebsd-11.1/usr/src/sys/kern/kern_sx.c
--- /usr/src/sys/kern/kern_sx.c 2017-07-21 07:41:54.000000000 +0800
+++ freebsd-11.1/usr/src/sys/kern/kern_sx.c 2019-03-23 12:48:39.598444000 +0800
@@ -814,7 +814,7 @@
kick_proc0();
}
-static bool __always_inline
+static inline bool __always_inline
__sx_slock_try(struct sx *sx, uintptr_t *xp, const char *file, int line)
{
@@ -1050,7 +1050,7 @@
return (error);
}
-static bool __always_inline
+static inline bool __always_inline
_sx_sunlock_try(struct sx *sx, uintptr_t *xp)
{
diff -ru --exclude-from freebsd-src-diff-exclude-names /usr/src/sys/kern/sched_ule.c freebsd-11.1/usr/src/sys/kern/sched_ule.c
--- /usr/src/sys/kern/sched_ule.c 2017-07-21 07:41:54.000000000 +0800
+++ freebsd-11.1/usr/src/sys/kern/sched_ule.c 2019-03-22 15:09:02.033645000 +0800
@@ -642,7 +642,7 @@
for ((cpu) = 0; (cpu) <= mp_maxid; (cpu)++) \
if (CPU_ISSET(cpu, &mask))
-static __always_inline int cpu_search(const struct cpu_group *cg,
+static inline __always_inline int cpu_search(const struct cpu_group *cg,
struct cpu_search *low, struct cpu_search *high, const int match);
int __noinline cpu_search_lowest(const struct cpu_group *cg,
struct cpu_search *low);
@@ -662,7 +662,7 @@
* match argument. It is reduced to the minimum set for each case. It is
* also recursive to the depth of the tree.
*/
-static __always_inline int
+static inline __always_inline int
cpu_search(const struct cpu_group *cg, struct cpu_search *low,
struct cpu_search *high, const int match)
{