From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id GcrcIgAzq2qIWBQAWB0awg (envelope-from ) for ; Wed, 16 Sep 2026 20:23:28 -0400 Authentication-Results: simark.ca; dkim=fail reason="signature verification failed" (768-bit key; unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=xP+9R3AW; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 88A561E06B; Wed, 16 Sep 2026 20:23:28 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_BL_SPAMCOP_NET, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=no autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id DD9DE1E051 for ; Wed, 16 Sep 2026 20:23:27 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 74ABB4BA798A for ; Thu, 17 Sep 2026 00:23:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 74ABB4BA798A Authentication-Results: sourceware.org; dkim=fail reason="signature verification failed" (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=xP+9R3AW Received: from omta040.useast.a.cloudfilter.net (omta040.useast.a.cloudfilter.net [44.202.169.39]) by sourceware.org (Postfix) with ESMTPS id 4791E4BA23FB for ; Thu, 17 Sep 2026 00:23:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4791E4BA23FB Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 4791E4BA23FB Authentication-Results: sourceware.org; arc=none smtp.remote-ip=44.202.169.39 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1789604580; cv=none; b=BoiFANerfgXPg8XBRTUmSwG3J0VOG385L2NEtzbh+cCzoxuTzzDzfbpaqLsqHEQ8xWHxjdjWFWt3LDYVwkZNW7zzru39WT98tl71sbfKzOtC5xXE1JTP1RqyLfLHqKic4SXgJdZLV058yG26BpFyJ64zwmIVJWPA6wUGzTj76Hk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1789604580; c=relaxed/simple; bh=zWjBjIz0YMV6xpRJ/bTIMzfYqlR6sg0vDb5vMqVKxm8=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Kv2ourGVQzy0pn8cUfQwF6E8xrImSt4zahChReZNu7Qo2tGRPqfD0Xwl0EBKPnntLHfIBn92oepB18OXE0vUniQW1F4XNT6LW4d5ig0M3UrNFrY+qLjIKKuU2Q33OZK7rdiIgZ/K4xg0xNf/7AZF9kowfnDBeTrQ+yZhHtpHrkg= ARC-Authentication-Results: i=1; sourceware.org; dkim=policy (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=xP+9R3AW reason="signing key too small" DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4791E4BA23FB Received: from eig-obgw-5001b.ext.cloudfilter.net ([10.0.29.181]) by cmsmtp with ESMTPS id 6uwMxVhf7uFzg6ztzxyMOu; Thu, 17 Sep 2026 00:22:59 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id 6ztzxEkaiX1zQ6ztzxemjT; Thu, 17 Sep 2026 00:22:59 +0000 X-Authority-Analysis: v=2.4 cv=PP4P+eqC c=1 sm=1 tr=0 ts=6aab32e3 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=VdqzKS8jKosA:10 a=ItBw4LHWJt0A:10 a=yzKa-h_HKNiz_WlOO_cA:9 a=DCx65vhANUyCzuf5D8fC:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Unsubscribe-Post: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ybVPXIUq0bOc7+PhNRW4/wb+wn+yzSNL6QZ7zOw9b7Y=; b=xP+9R3AWqV05fZrdbZJLyF2KSk PEyTiv8+HmhiMAtRKf0xUDbQGAQVw5HOErOnIHLTiXPutpiPXqs5Udpk1um57tprrlPe7TQFJ/3K7 1CyZpKR4NSbezwEX38XlevkIL; Received: from 75-166-229-74.hlrn.qwest.net ([75.166.229.74]:43448 helo=prentzel) by box5379.bluehost.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.100) (envelope-from ) id 1x6ztz-00000003lRM-14XH; Wed, 16 Sep 2026 18:22:58 -0600 From: Tom Tromey To: Tom de Vries Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 2/2] [gdb] Exclude unavailable hardware threads in default worker-threads In-Reply-To: <20260906154838.139837-2-tdevries@suse.de> (Tom de Vries's message of "Sun, 6 Sep 2026 17:48:38 +0200") References: <20260906154838.139837-1-tdevries@suse.de> <20260906154838.139837-2-tdevries@suse.de> X-Attribution: Tom Date: Wed, 16 Sep 2026 18:22:57 -0600 Message-ID: <87h5jo680u.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 75.166.229.74 X-Source-L: No X-Exim-ID: 1x6ztz-00000003lRM-14XH X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 75-166-229-74.hlrn.qwest.net (prentzel) [75.166.229.74]:43448 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfOgeTGioyH1TLicUxDNGIjMmV1WB2Rur9rGr3GqGOw/ZwIXbH04UzhbzOIv0QY7LkEC+lLsIUFK0qu5BvrKlDTY3aMRvYcOSk7z59X5b9yzu1J6fungW l8FBNIbfWbG+zr64/yrho7Dps6TpoIMiU7t0Q5To62G4suxkfTy34vvyULervlGTrkMYlxsixVRveP4AqNyWIYq5EpoWOwzELaw= X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org >>>>> "Tom" == Tom de Vries writes: Sorry I didn't reply to this earlier. I saw it went in. Tom> +#ifdef __linux__ Tom> +#include Tom> +#endif The autoconf wisdom is to do feature checks, not platform checks, a style that's generally used in gdb. And you can see the result here, where the above turned into +#if defined (__linux__) || defined (__CYGWIN__) Tom> + /* Exclude unavailable hardware threads (for instance made Tom> + unavailable using taskset). */ Tom> +#ifdef __linux__ Tom> + cpu_set_t cpus; Tom> + int res = sched_getaffinity (getpid (), sizeof (cpu_set_t), &cpus); Likewise for functions. Tom> +#else Tom> + /* Todo: handle other platforms. */ Tom> +#endif gdb generally has stopped adding todo/FIXME/etc comments, mainly because nobody ever actually does them. Sometimes there are exceptions for specific plans, I'm guilty of this myself with the Python safety code. But here I think leaving this out would be completely fine, it's implicit that ports to new hosts may be desirable. thanks, Tom