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
This commit is contained in:
Konstantin Belousov 2015-06-11 04:41:54 +00:00
parent 5b381db8cc
commit 529c97886b

View File

@ -34,7 +34,6 @@ __FBSDID("$FreeBSD$");
#include <sys/timetc.h>
#include <sys/timex.h>
#include <sys/vdso.h>
#include <machine/atomic.h>
/*
* A large step happens on boot. This constant detects such steps.
@ -190,7 +189,7 @@ tc_delta(struct timehands *th)
tc->tc_counter_mask);
}
static u_int
static inline u_int
tc_getgen(struct timehands *th)
{
@ -205,7 +204,7 @@ tc_getgen(struct timehands *th)
#endif
}
static void
static inline void
tc_setgen(struct timehands *th, u_int newgen)
{