From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Omar Polo Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] support for accessing CPU/core count (processor-count) Date: Mon, 11 Oct 2021 10:23:05 +0200 Message-ID: <87h7dooti7.fsf@omarpolo.com> References: <87h7dpgues.fsf@omarpolo.com> <871r4tgp9o.fsf@omarpolo.com> <87o87xf5ag.fsf@omarpolo.com> <8735p8ensy.fsf@omarpolo.com> <8735p8d1lc.fsf@omarpolo.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12034"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.6.6; emacs 28.0.50 Cc: Campbell Barton , emacs-devel@gnu.org To: Arthur Miller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Oct 11 10:29:18 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mZqgN-0002rw-SP for ged-emacs-devel@m.gmane-mx.org; Mon, 11 Oct 2021 10:29:16 +0200 Original-Received: from localhost ([::1]:47272 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mZqgM-0000nn-SW for ged-emacs-devel@m.gmane-mx.org; Mon, 11 Oct 2021 04:29:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51498) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mZqfX-00005l-GV for emacs-devel@gnu.org; Mon, 11 Oct 2021 04:28:23 -0400 Original-Received: from mail.omarpolo.com ([144.91.116.244]:65449) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mZqfV-0001RH-7m for emacs-devel@gnu.org; Mon, 11 Oct 2021 04:28:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=omarpolo.com; s=20200327; t=1633940898; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=HymjquS7dnyBylXAnpahLmRhty8XHPnGv2YpPdjacNM=; b=R70dr6EUfKQlpNDwjoYCooTaXJsZ158vL2+wdH1eU4PPdEg7ENbv4Z5ecuLvEsZoRjFgwv tiiLEMXPgT1hNoJs29tnsL99cG79Ul7eg6u73emeU3f+WNREurgMw8ZpmXrdHcbGR4H0Jn UbtZKHNgKpZ6wl1zsoPF+Kdr07Cq4GI= Original-Received: from localhost (host-79-45-237-189.retail.telecomitalia.it [79.45.237.189]) by mail.omarpolo.com (OpenSMTPD) with ESMTPSA id bbd4edd4 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 11 Oct 2021 10:28:18 +0200 (CEST) Original-Received: from venera (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id bcd5ddd9; Mon, 11 Oct 2021 10:28:16 +0200 (CEST) In-reply-to: Received-SPF: pass client-ip=144.91.116.244; envelope-from=op@omarpolo.com; helo=mail.omarpolo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:276732 Archived-At: Arthur Miller writes: > Omar Polo writes: > >> But I'd like to add a small correction to your example. The sysctl is >> not correct on OpenBSD (and maybe NetBSD too? I can't check.) It >> should read >> >> (shell-command-to-string "sysctl -n hw.ncpuonline || sysctl -n hw.ncp") > > There you have a patch! > > Check the function 'comp-effective-async-max-jobs' in comp.el, line 3881. > > Fix the bsd-case in cond-statement and give Andrea a patch, so he does not have > to bother :). Isn't this just fixed (or about to get fixed) by Paul Eggert? In a previous mail he attached two patches, one already installed in the gnulib repo to fix this ncpu/ncpuonline issue (thanks!) and another to use that gnulib function in Emacs (and specifically in comp.el.) or am I missing something?