Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Jun 2015 04:41:54 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r284256 - head/sys/kern
Message-ID:  <201506110441.t5B4fsK5003759@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Thu Jun 11 04:41:54 2015
New Revision: 284256
URL: https://svnweb.freebsd.org/changeset/base/284256

Log:
  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

Modified:
  head/sys/kern/kern_tc.c

Modified: head/sys/kern/kern_tc.c
==============================================================================
--- head/sys/kern/kern_tc.c	Thu Jun 11 04:22:17 2015	(r284255)
+++ head/sys/kern/kern_tc.c	Thu Jun 11 04:41:54 2015	(r284256)
@@ -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)
 {
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201506110441.t5B4fsK5003759>