Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wL6GY-001Wn6-1n for pgsql-hackers@arkaria.postgresql.org; Thu, 07 May 2026 21:28:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wL6GW-006HYJ-1b for pgsql-hackers@arkaria.postgresql.org; Thu, 07 May 2026 21:28:16 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wL6GV-006HXi-34 for pgsql-hackers@lists.postgresql.org; Thu, 07 May 2026 21:28:16 +0000 Received: from mail-qt1-x832.google.com ([2607:f8b0:4864:20::832]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wL6GS-00000000hbB-45za for pgsql-hackers@postgresql.org; Thu, 07 May 2026 21:28:15 +0000 Received: by mail-qt1-x832.google.com with SMTP id d75a77b69052e-5148cbdea08so918301cf.2 for ; Thu, 07 May 2026 14:28:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1778189293; x=1778794093; darn=postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=hrTo0LcUtGtsF7SHDWXOi2UDr2MkHvewQwgMhcCV7u4=; b=AX+hlfWyucwiaoamEQFZT6bMXMgfwE0S2dlSRdGWSfr5sQCD5Pb3GS60rICYE9ZL2k rVmHxJuA+13HvpcIsPdPL0NUqO5WJcliDFUdUTD+smcXlYnKWA6An1S7jIIwrvNL2qJH DnPLzxg3oXT3cXBG7pvx49rilxDxt9DKreDY3m63ZWuR0LiBr/OIb4FyDVugvaJufY7+ 2uGFsAP6lflgo7J99/nXa/V3ORfLeHhysY1G14Z/McFsd1EWNeRl657X1a/2vo7VJJer 8+p99fZrW8E2QNnNGhEVhCluCSE1vxYLaxa1OM7b2EUzSeEsD63boHKTxZQiT3s7l01v i8/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778189293; x=1778794093; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hrTo0LcUtGtsF7SHDWXOi2UDr2MkHvewQwgMhcCV7u4=; b=kvzq1jeqgCN6aPtSNPeJ30dzUspEV/C1hS5mdYrkagZNCF7Kw74JNDVkHFxrjYT3j3 W92hM8p0m0K4+7fJnkfxqLL4G/C0zZrarqF/MqO+NHn5VScGuhN/xQgfo2zNYPTR7pwY 20LKCbc6dYpasE81Ty/jOuMJUgxdEPDMAw4Qwfmcn3B89sb2JI5wh8uWKx6nKdx3fV7a A36quqwtnWb2WwR4aXhjNzbh3Eo+4z0wTMwjWS8hr/1TsS0iKbhsb5kVRslpjuQblVbB CEUP3PFmbtgaKh+bQDwayngKXO5gdNqWkdUk76h9UPyQSnBx3R9tiX1BRDanKZ9xmPiC StLA== X-Gm-Message-State: AOJu0YwiSxApk1ifDVGuRzcYfT0zi2jEoKN6g9DRfeMpZFCpudLTUNOF dU3hoIKWtfsE7xMhsbSVOWzZgZeG/Nm7v9SeWqNcQomY0KKyU/DW1St6 X-Gm-Gg: AeBDietkgkcgwz0oUY41VXYCbyyJ5Eijm5coz4Wb/rgauwyBh8uJP4mFN729fnrej3W jk/ikQZ4JiA6VgGH7AUn9p6S/Hxvr9KxZ2dnMXTHiP89foj3FQLsYr+TO7IYY1hI3X0rP39wKoF Q75yAwxJZ8kQOUtKmjD9QAUtLnv43rieEWLM7b/S3R2XqFZknkh7eq2howYljhGqbgqkf7bCLL6 s5qzfdkJVTaA8D+s8W98Sddo1OnZHG+SMucBon5SXuDoilYCtQQ0CYCjAhXFmMkPWBba52UuF2w TT4l9fiMeFbWCcTC9anNwHlkXfiqIJGtD8jrx10boKyjsNx81YRkMDjkTxX7fp2A5UKeEamKANG 2UKFwwWghgvao3uibFuCL204za+k7Jci3+WHJF/XTeqWQ6rEXhACbagG+uHHroK1n3brz84BHAj /JTOhrAUhYTD1h3GHUPUpWilADZkM54u015+j4rCXgPbhhy4EFQHyDRYKg1TD3FKFoq4L90PrxD EgGemanPZLfAm8pyxphYw== X-Received: by 2002:a05:622a:138f:b0:50b:3824:e222 with SMTP id d75a77b69052e-51461faf6d8mr137428591cf.41.1778189292656; Thu, 07 May 2026 14:28:12 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-51485365ce6sm9182591cf.29.2026.05.07.14.28.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 May 2026 14:28:12 -0700 (PDT) Date: Thu, 7 May 2026 16:28:09 -0500 From: Nathan Bossart To: Tom Lane Cc: pgsql-hackers@postgresql.org Subject: Re: small cleanup for s_lock.h Message-ID: References: <369933.1777933007@sss.pgh.pa.us> <532705.1778000169@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="EzTP03ol5OjsRjZr" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --EzTP03ol5OjsRjZr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, May 07, 2026 at 04:12:09PM -0500, Nathan Bossart wrote: > On Thu, May 07, 2026 at 03:41:56PM -0500, Nathan Bossart wrote: >> +/* >> + * We can only define TAS_SPIN if TAS was defined. Otherwise, the platform >> + * defined its own S_LOCK without TAS, and therefore is responsible for >> + * defining its own TAS_SPIN as well. (Note that we currently do not have any >> + * platforms that don't define TAS.) >> + */ >> #if !defined(TAS_SPIN) >> +#if defined(TAS) >> #define TAS_SPIN(lock) TAS(lock) >> -#endif /* TAS_SPIN */ >> +#else >> +#error Neither TAS nor TAS_SPIN defined on this platform. Please report this to pgsql-bugs@lists.postgresql.org. >> +#endif /* TAS */ >> +#endif /* ! TAS_SPIN */ > > Wait, this isn't right. TAS_SPIN is only used by s_lock(), which is only > used by the default S_LOCK. We should just not compile s_lock() if the > platform defines its own S_LOCK, and we shouldn't #error here if TAS is not > defined. Should be fixed in v5, sorry for the noise. -- nathan --EzTP03ol5OjsRjZr Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=v5-0001-Remove-fallback-declaration-for-tas.patch