From owner-svn-src-head@FreeBSD.ORG Sat Apr 7 17:10:29 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1886E1065670; Sat, 7 Apr 2012 17:10:29 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (ZIM.MIT.EDU [18.95.3.101]) by mx1.freebsd.org (Postfix) with ESMTP id A7E9C8FC0C; Sat, 7 Apr 2012 17:10:22 +0000 (UTC) Received: from zim.MIT.EDU (localhost [127.0.0.1]) by zim.MIT.EDU (8.14.5/8.14.2) with ESMTP id q37HAMHK003022; Sat, 7 Apr 2012 13:10:22 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by zim.MIT.EDU (8.14.5/8.14.2/Submit) id q37HAMPT003021; Sat, 7 Apr 2012 13:10:22 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Date: Sat, 7 Apr 2012 13:10:22 -0400 From: David Schultz To: David Chisnall Message-ID: <20120407171022.GB2737@zim.MIT.EDU> Mail-Followup-To: David Chisnall , Konstantin Belousov , Kirk McKusick , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201203011845.q21IjQqt091350@svn.freebsd.org> <20120302125334.GH75778@deviant.kiev.zoral.com.ua> <0F23DDD1-1CAC-4E72-A3CB-56B81F0C0790@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0F23DDD1-1CAC-4E72-A3CB-56B81F0C0790@FreeBSD.org> Cc: Konstantin Belousov , svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG, Kirk McKusick Subject: Re: svn commit: r232351 - in head/sys: kern sys ufs/ffs ufs/ufs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Apr 2012 17:10:29 -0000 On Fri, Mar 02, 2012, David Chisnall wrote: > On 2 Mar 2012, at 12:53, Konstantin Belousov wrote: > > > This part of the change breaks KBI. I suggest that for merge to stable/9 > > you would leave the bread and breadn as functions. > > Can we not do this for the general case? Provide them as inline > extern functions in the header, and implement them elsewhere, so > the compiler will inline them in recompiled code but not break > code that isn't? The biggest hinderance to using extern inline is that gcc and C99 disagree about what it means, unless you use a reasonably recent compiler in C99 mode. I first tried to use extern inline in the tree several years after I backported gcc's C99 inline support, and it still turned out to be a headache. Of course, the kernel is easier because we can insist on a recent compiler in C99 mode, but perhaps there's still some lingering confusion. I've been meaning to write up a wiki page about how to use the different types of inlines, and when they'd be appropriate...but I have very limited time for the next few months.