Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1X2KQ1-0007be-63 for pgsql-hackers@arkaria.postgresql.org; Wed, 02 Jul 2014 13:17:49 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1X2KQ0-0004EA-4y for pgsql-hackers@arkaria.postgresql.org; Wed, 02 Jul 2014 13:17:48 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1X2KPu-00043P-3e for pgsql-hackers@postgresql.org; Wed, 02 Jul 2014 13:17:42 +0000 Received: from mail.anarazel.de ([217.115.131.40]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1X2KPq-0004Ia-Gl for pgsql-hackers@postgresql.org; Wed, 02 Jul 2014 13:17:39 +0000 Received: by mail.anarazel.de (Postfix, from userid 108) id 881AB500002; Wed, 2 Jul 2014 15:17:37 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on mail X-Spam-Level: X-Spam-Status: No, score=-5.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from anarazel.de (p5DDC4445.dip0.t-ipconnect.de [93.220.68.69]) (Authenticated sender: andres@anarazel.de) by mail.anarazel.de (Postfix) with ESMTPSA id 020D1500001; Wed, 2 Jul 2014 15:17:30 +0200 (CEST) Received: by anarazel.de (Postfix, from userid 1000) id 8ABC81004C1; Wed, 2 Jul 2014 15:17:29 +0200 (CEST) Date: Wed, 2 Jul 2014 15:17:29 +0200 From: Andres Freund To: Heikki Linnakangas Cc: Robert Haas , Tom Lane , Peter Geoghegan , Pg Hackers , Ants Aasma Subject: Re: better atomics - v0.5 Message-ID: <20140702131729.GP21169@awork2.anarazel.de> References: <20140625171434.GG24114@awork2.anarazel.de> <20140625203635.GJ24114@awork2.anarazel.de> <53AB424D.8030306@vmware.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <53AB424D.8030306@vmware.com> X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 2014-06-26 00:42:37 +0300, Heikki Linnakangas wrote: > On 06/25/2014 11:36 PM, Andres Freund wrote: > > > >>>- I completely loathe the file layout you've proposed in > >>>src/include/storage. If we're going to have separate #include files > >>>for each architecture (and I'd rather we didn't go that route, because > >>>it's messy and unlike what we have now), then shouldn't that stuff go > >>>in src/include/port or a new directory src/include/port/atomics? > >>>Polluting src/include/storage with a whole bunch of files called > >>>atomics-whatever.h strikes me as completely ugly, and there's a lot of > >>>duplicate code in there. > >I don't mind moving it somewhere else and it's easy enough to change. > > I think having a separate file for each architecture is nice. I totally > agree that they don't belong in src/include/storage, though. s_lock.h has > always been misplaced there, but we've let it be for historical reasons, but > now that we're adding a dozen new files, it's time to move them out. So, src/include/port/atomics.h, src/include/port/atomics/generic-$compiler.h, src/include/port/atomics/arch-$arch.h, src/include/port/atomics/fallback.h, src/include/port/atomics/generic.h, src/backend/port/atomics.c ? Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers