From owner-svn-src-projects@FreeBSD.ORG Wed Sep 19 04:18:16 2012 Return-Path: Delivered-To: svn-src-projects@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08448106564A; Wed, 19 Sep 2012 04:18:16 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 911A98FC12; Wed, 19 Sep 2012 04:18:14 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q8J4INDA093360; Wed, 19 Sep 2012 07:18:23 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q8J4IBxl040165; Wed, 19 Sep 2012 07:18:11 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q8J4IB7r040164; Wed, 19 Sep 2012 07:18:11 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 19 Sep 2012 07:18:11 +0300 From: Konstantin Belousov To: Attilio Rao Message-ID: <20120919041811.GM37286@deviant.kiev.zoral.com.ua> References: <201207301350.q6UDobCI099069@svn.freebsd.org> <201207301732.33474.jhb@freebsd.org> <20120918083324.GX37286@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="nw7Js0ltx4YC415X" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: Davide Italiano , src-committers@FreeBSD.org, John Baldwin , Jeff Roberson , Dimitry Andric , svn-src-projects@FreeBSD.org Subject: Re: svn commit: r238907 - projects/calloutng/sys/kern X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2012 04:18:16 -0000 --nw7Js0ltx4YC415X Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 18, 2012 at 08:00:48PM +0100, Attilio Rao wrote: > On Tue, Sep 18, 2012 at 4:30 PM, Attilio Rao wrote: > > On 9/18/12, Konstantin Belousov wrote: > >> Traditionally, we do provide the fallback for non-GNUC compilers, by > >> defining extern function with the compatible signature. In this case, > >> the empty function just works for the purpose, although with higher > >> overhead than the GNUC case. > > > > I agree, we need a fallback here. Unfortunately I'm buried with job > > stuff but I will provide an errata patch ASAP. >=20 > Here is the patch. I didn't use a real extern function body for it, > but just went with an empty macro. >=20 > Attilio > +/* > + * Compiler memory barriers, specific to gcc and clang. > + */ > +#if defined(__GNUC__) > +#define __compiler_membar() __asm __volatile(" " : : : "memor= y") > +#else > +#define __compiler_membar() struct __hack > +#endif I would not call this an empty macro. If this works at all, it requires c99 compiler. Why not just do extern void __compiler_membar(void); for !GNUC. Note that we never supplied actual implementation for the placeholders, as evidenced e.g. by cpufunc.h or fpu.c. --nw7Js0ltx4YC415X Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAlBZR4MACgkQC3+MBN1Mb4hxdwCg4wHPl+zVhvePEf2jQEmTETjD 72MAoN7T5BjU8vrkX2AdVvMsFz0MVeZq =znf+ -----END PGP SIGNATURE----- --nw7Js0ltx4YC415X--