Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1apzXZ-0007vs-F3 for pgsql-hackers@arkaria.postgresql.org; Tue, 12 Apr 2016 14:43:41 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1apzXY-0003km-Os for pgsql-hackers@arkaria.postgresql.org; Tue, 12 Apr 2016 14:43:40 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1apzWD-0002F8-CL for pgsql-hackers@postgresql.org; Tue, 12 Apr 2016 14:42:17 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1apzWA-0000Zg-4a for pgsql-hackers@postgresql.org; Tue, 12 Apr 2016 14:42:16 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u3CEgBCE032013; Tue, 12 Apr 2016 10:42:11 -0400 From: Tom Lane To: Andres Freund cc: pgsql-hackers@postgresql.org Subject: Re: [COMMITTERS] pgsql: Allow Pin/UnpinBuffer to operate in a lockfree manner. In-reply-to: <20160412050038.ua2avkwi6dxxcjhx@alap3.anarazel.de> References: <1881.1460431476@sss.pgh.pa.us> <4369.1460435533@sss.pgh.pa.us> <20160412050038.ua2avkwi6dxxcjhx@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Mon, 11 Apr 2016 22:00:38 -0700" Date: Tue, 12 Apr 2016 10:42:11 -0400 Message-ID: <32012.1460472131@sss.pgh.pa.us> X-Pg-Spam-Score: -2.9 (--) 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 Andres Freund writes: > On 2016-04-12 00:32:13 -0400, Tom Lane wrote: >> Apparently, assigning the result of init_spin_delay() is not as portable >> as you thought. > Hm. I'm not sure why not though? Is it because delayStatus isn't static > or global scope? It looks like that compiler adheres to the C89 restriction that an initializer for an array or struct must contain only link-time-constant expressions, even if the target object is of dynamic scope. The macro works with a link-time-constant pointer argument, but not with one that must be evaluated at runtime. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers