Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Apr 2012 13:10:22 -0400
From:      David Schultz <das@FreeBSD.ORG>
To:        David Chisnall <theraven@FreeBSD.ORG>
Cc:        Konstantin Belousov <kostikbel@gmail.com>, svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG, Kirk McKusick <mckusick@FreeBSD.ORG>
Subject:   Re: svn commit: r232351 - in head/sys: kern sys ufs/ffs ufs/ufs
Message-ID:  <20120407171022.GB2737@zim.MIT.EDU>
In-Reply-To: <0F23DDD1-1CAC-4E72-A3CB-56B81F0C0790@FreeBSD.org>
References:  <201203011845.q21IjQqt091350@svn.freebsd.org> <20120302125334.GH75778@deviant.kiev.zoral.com.ua> <0F23DDD1-1CAC-4E72-A3CB-56B81F0C0790@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



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