From 4d0ade962d1871211b2eb9deb97aa8c409076c90 Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Thu, 11 Jun 2015 04:41:54 +0000 Subject: timecounter: Merge FreeBSD change r284256 Tweaks for r284178: Do not include machine/atomic.h explicitely, the header is already included by sys/systm.h. Force inlining of tc_getgen() and tc_setgen(). The functions are used more than once, which causes compilers with non-aggressive inlining policies to generate calls. Suggested by: bde Sponsored by: The FreeBSD Foundation MFC after: 1 week Update #3175. --- cpukit/score/src/kern_tc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'cpukit/score/src') diff --git a/cpukit/score/src/kern_tc.c b/cpukit/score/src/kern_tc.c index 242983b464..413548e29b 100644 --- a/cpukit/score/src/kern_tc.c +++ b/cpukit/score/src/kern_tc.c @@ -62,7 +62,6 @@ __FBSDID("$FreeBSD r284178 2015-06-09T11:49:56Z$"); #include #ifndef __rtems__ #include -#include #endif /* __rtems__ */ #ifdef __rtems__ #include @@ -278,7 +277,7 @@ tc_delta(struct timehands *th) tc->tc_counter_mask); } -static u_int +static inline u_int tc_getgen(struct timehands *th) { @@ -297,7 +296,7 @@ tc_getgen(struct timehands *th) #endif /* __rtems__ */ } -static void +static inline void tc_setgen(struct timehands *th, u_int newgen) { -- cgit v1.2.3