From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.devel Subject: Re: add pthread_set_name_np support Date: Mon, 29 Jun 2020 10:26:59 +0200 Message-ID: References: <875zbcrdfv.fsf@asteroid.bittivirhe.fi> <83r1u03gtt.fsf@gnu.org> <87v9jcpt7d.fsf@asteroid.bittivirhe.fi> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="10347"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , emacs-devel@gnu.org To: timo.myyra@bittivirhe.fi (Timo =?utf-8?Q?Myyr=C3=A4?=) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jun 29 10:27:59 2020 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 1jpp8x-0002c9-CV for ged-emacs-devel@m.gmane-mx.org; Mon, 29 Jun 2020 10:27:59 +0200 Original-Received: from localhost ([::1]:37334 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jpp8w-0001wd-Cw for ged-emacs-devel@m.gmane-mx.org; Mon, 29 Jun 2020 04:27:58 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52600) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jpp87-0001Ml-LP for emacs-devel@gnu.org; Mon, 29 Jun 2020 04:27:07 -0400 Original-Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:34214) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jpp84-0003sz-Bg; Mon, 29 Jun 2020 04:27:07 -0400 Original-Received: by mail-wr1-x430.google.com with SMTP id f7so12611321wrw.1; Mon, 29 Jun 2020 01:27:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:gmane-reply-to-list:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=7PkM5zuBtJd5HDdoI0SdfF2X9NK7/OmAfCTWdc1zsjQ=; b=OlphHj4PnjRfWWT3Du+ZxHIrzB+LVx/BUTSOgN/JbJgST4l6GUM8g3L4XKReUGMWjy NfyswOzEm3rVP3gyDAmayDnS5/iIc1JuNdFT6V3rdKPUJKwFDkicppxW93zR5Lcpczi1 8WpRmT0rkrGdR3kPrVzvvss+LG0BCUtMp0BBhss3HhOlds85VAZk/LjDdCgbrF8q+RsH Yg18HJOgvONdajR1lC/WfJcMd2UNH1LVwLDQTBLFlHOYjLphuKEdMx7YwoFqx84MutJ7 Whyf2a2QV7ikkdZJ13v69bmHSQPquXl1tdjGhMdb3VF5ErPH/3qwq7HR2PTAEDVvoMYQ YFwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references :gmane-reply-to-list:date:in-reply-to:message-id:mime-version :content-transfer-encoding; bh=7PkM5zuBtJd5HDdoI0SdfF2X9NK7/OmAfCTWdc1zsjQ=; b=B5/2Jn9F3BHWXgrhcVgEkSJiDV7PHzVIZ5foLS9A87/4iW8t6I/Sh2jNKMw9cZs37p fHrdeASaJLCwIXBfYLsFnEwzQdA4fTUCZVn1tIEMpTBk00XtrKzZ+YfyWlRUgAz2zl8z V/VoCs0DKaFMm/O3NbTTvX3YBdZ+nfZkYeXpUqEU8lDGnwdgeJ/4f8UNTevAGADpC6rK oCNgw9McJdAoFWEvxMWBiuz7bbS6e1VwHZD9Y5PuMMzb3O3x3LxMsmCPO+/KJsV5pJn4 cK9rBhxb/9rZbfus2Ztnyk5pKdKrS7rPLBp6cEXKWHNkvM3EP3L3SP42ooHrsjyES1UA WdHQ== X-Gm-Message-State: AOAM532GXxQDl93q0E80xNBPs4224KeakI+4zUJa/Gd4ka2f9RFUiU6S CAI206W4TwdW93xwoYb6G33nmTTI X-Google-Smtp-Source: ABdhPJyMkHqdSta5brt2KUhzYelMkYXqK7vzPPPPe6THVpnPOqBYK2HEWQMZU7JumEEW2tYSlJtWIw== X-Received: by 2002:a5d:4611:: with SMTP id t17mr15122102wrq.243.1593419221693; Mon, 29 Jun 2020 01:27:01 -0700 (PDT) Original-Received: from rpluim-mac ([2a01:e34:ecfc:a860:9051:afee:9580:8319]) by smtp.gmail.com with ESMTPSA id e17sm12111801wrr.88.2020.06.29.01.27.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jun 2020 01:27:00 -0700 (PDT) Gmane-Reply-To-List: yes In-Reply-To: <87v9jcpt7d.fsf@asteroid.bittivirhe.fi> ("Timo =?utf-8?Q?Myyr?= =?utf-8?Q?=C3=A4=22's?= message of "Sat, 27 Jun 2020 15:51:50 +0300") Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=rpluim@gmail.com; helo=mail-wr1-x430.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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:252556 Archived-At: >>>>> On Sat, 27 Jun 2020 15:51:50 +0300, timo.myyra@bittivirhe.fi (Timo My= yr=C3=A4) said: Timo> diff --git a/configure.ac b/configure.ac Timo> index b1b8c846e1..f198894e02 100644 Timo> --- a/configure.ac Timo> +++ b/configure.ac Timo> @@ -4187,7 +4187,8 @@ AC_DEFUN Timo> sendto recvfrom getsockname getifaddrs freeifaddrs \ Timo> gai_strerror sync \ Timo> getpwent endpwent getgrent endgrent \ Timo> -cfmakeraw cfsetspeed __executable_start log2 pthread_setname_np) Timo> +cfmakeraw cfsetspeed __executable_start log2 pthread_setname_np \ Timo> +pthread_set_name_np) Timo> LIBS=3D$OLD_LIBS =20 Timo> if test "$ac_cv_func_pthread_setname_np" =3D "yes"; then Timo> @@ -4222,6 +4223,23 @@ AC_DEFUN Timo> fi Timo> fi I=CA=BCm confused; why do you need the explicit check for pthread_set_name_np when the AC_CHECK_FUNCS call above already checks for it (and sets HAVE_PTHREAD_SET_NAME_NP if successful). Timo> +if test "$ac_cv_func_pthread_set_name_np" =3D "yes"; then Timo> + AC_CACHE_CHECK( Timo> + [whether pthread_set_name_np is supported], Timo> + [emacs_cv_pthread_set_name_np], Timo> + [AC_COMPILE_IFELSE( Timo> + [AC_LANG_PROGRAM( Timo> + [[#include ][#include ]], Timo> + [[pthread_setname_np (1, "a");]])], Timo> + [emacs_cv_pthread_set_name_np=3Dyes], Timo> + [emacs_cv_pthread_set_name_np=3Dno])]) Timo> + if test "$emacs_cv_pthread_set_name_np" =3D "yes"; then Timo> + AC_DEFINE( Timo> + HAVE_PTHREAD_SET_NAME_NP, 1, Timo> + [Define to 1 if pthread_set_name_np is supported.]) Timo> + fi Timo> +fi Timo> +