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 1wL613-001Wd2-2N for pgsql-hackers@arkaria.postgresql.org; Thu, 07 May 2026 21:12:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wL612-006E8p-1N for pgsql-hackers@arkaria.postgresql.org; Thu, 07 May 2026 21:12:16 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wL612-006E8h-0Q for pgsql-hackers@lists.postgresql.org; Thu, 07 May 2026 21:12:16 +0000 Received: from mail-qk1-x735.google.com ([2607:f8b0:4864:20::735]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wL60z-000000014kx-47E3 for pgsql-hackers@postgresql.org; Thu, 07 May 2026 21:12:15 +0000 Received: by mail-qk1-x735.google.com with SMTP id af79cd13be357-8f0579401c4so157416185a.3 for ; Thu, 07 May 2026 14:12:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1778188332; x=1778793132; 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=U3fEas/ol/1nXUANbqxXtThcTYVT3osH0A9Ix31nx90=; b=gmOC4CL+5IBKQYgtqDgLdQSZznSUd1ifvfZEveZ/cW+kIZjhgisy/mWWnMZUYe3DI+ n1yRuGmo3MS+1dLNJckorQlYKbkU/jIi9F0GFofYCRQ80R15k5X/ZTo8xoG+qxMJ16e1 nXOgDcanNqxlGUa/5/3JP8ioKRIZjpGrDKHZad5Fe3cPCQM3zvle59DMtanp5vcifoqL yu80R/6+Ts3vxJ3UhMWdVlf/40Bx1lP+QC5dyk2Fb/9D4T+ta9xEgZZySG34X0L+KPRQ 62sJftkpZ6sxE60V9tc6hLYUXpW6w3lHojybX4WLw8NnyoukF+TLqGgJZeecSKmhaR79 Z42g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778188332; x=1778793132; 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=U3fEas/ol/1nXUANbqxXtThcTYVT3osH0A9Ix31nx90=; b=XMln5R1SpRY0gzudv2NrXcUIqxmLybFGhe8IN7V3edD8Fqwami9OXoA0ThLcNrsKTY ydmKzYFrKVUBrKNOjneIQLBGjWskX7rFMveWjaDSdURZY6JHK72aIU8Y8Bv1VwvTOoMy qGvi96z9PjjNmPCX50Xtd6bgGPf6DugNpi1lXwL4ZdyfpS9ENnTjVTtPpbtyvTjNyq2w KhA5xXgV7hKVU+tMYqKUBdR3nM5y6CAg/+3r/hWa9Guod2rgGuK9sNZVuNUjcC0LBmRq wjGoslFOVA+kN0Y/4BmM2ZcQ+D7oDpAh5h0VvcYkuzfn4viI2ZXeNk2EU6mohB8KbmCD 3sAA== X-Gm-Message-State: AOJu0YzsobTuwhOa39ydoaIOnTgRDOVxTC3kNz8mjm2NI4C0IsUAjFEI Uura+bJmZHQC/Qb5jvja3ZM1iGgw/fh6jx1atPUgkB/JIR9IYozJzTE+ X-Gm-Gg: AeBDiet5ZMrTw6DNDm3Gr/14rtuDraQqvEvvJG/xmfPVERw1kHpycodxvDXvO3EJVy/ ceJhCgIUwW3nyIOIYOdYYm2gPJstdA/ItHZsuoWOa1T/21ygo+oAngPohlkY1OHWOH6qCRww/DL aC3HIrNhs4uqhMzHS+Ue41ClXufmUv7D+mX/FacMF8LxaczcVG9GIEfy8Ms0DOdw8UDCabO8AJd T/4hiGGGYx/BjKGL4jW02vWG02acA2So1nA8YS494heHnjJPN4XkMNAlf5pDlCyKk8Mga9Ppzbi KoajyINahWOXPW8lt861i0qelUycRzNoAxsL17uGVTuNuUpAi811WSz5kQy9zHF/U8OI02HMJNj 9e4J8bcoxj3Ua90zzZAO46CFEShLFcXR4kf+xltCnzJtu5fdpbaS5KD8ADVm8zFSOMFWlQGt/+6 nEeSVuV6nmtPnD08JOk7HAaet3zwM95+Wlym6Lk84+hIKKpopYmnxOCrFL5UQ20q766NZQFvY+A yppJCKGVc1EqjbIqdoc3Q== X-Received: by 2002:a05:620a:370d:b0:8ee:54a3:ba30 with SMTP id af79cd13be357-904d69d8e0cmr1414329185a.49.1778188331591; Thu, 07 May 2026 14:12:11 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id af79cd13be357-907a6c592cfsm15475885a.25.2026.05.07.14.12.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 May 2026 14:12:11 -0700 (PDT) Date: Thu, 7 May 2026 16:12: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: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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. -- nathan