From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.bugs Subject: bug#30106: [PATCH 2/2] Fix module support if threads are disabled (Bug#30106) Date: Thu, 18 Jan 2018 19:25:53 +0000 Message-ID: References: <20180117222846.93077-1-phst@google.com> <20180117222846.93077-2-phst@google.com> <83y3kvuuui.fsf@gnu.org> <83mv1bur66.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="f403043604144bf785056311efd1" X-Trace: blaine.gmane.org 1516303523 27731 195.159.176.226 (18 Jan 2018 19:25:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 18 Jan 2018 19:25:23 +0000 (UTC) Cc: phst@google.com, 30106@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jan 18 20:25:18 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ecFoE-0006UO-O0 for geb-bug-gnu-emacs@m.gmane.org; Thu, 18 Jan 2018 20:25:10 +0100 Original-Received: from localhost ([::1]:49781 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecFqE-00087c-9k for geb-bug-gnu-emacs@m.gmane.org; Thu, 18 Jan 2018 14:27:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54421) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecFq7-00087B-Rd for bug-gnu-emacs@gnu.org; Thu, 18 Jan 2018 14:27:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ecFq2-00033I-SB for bug-gnu-emacs@gnu.org; Thu, 18 Jan 2018 14:27:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54031) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ecFq2-000335-O6 for bug-gnu-emacs@gnu.org; Thu, 18 Jan 2018 14:27:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ecFq2-0000wi-GJ for bug-gnu-emacs@gnu.org; Thu, 18 Jan 2018 14:27:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Philipp Stephani Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 18 Jan 2018 19:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30106 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 30106-submit@debbugs.gnu.org id=B30106.15163035733573 (code B ref 30106); Thu, 18 Jan 2018 19:27:02 +0000 Original-Received: (at 30106) by debbugs.gnu.org; 18 Jan 2018 19:26:13 +0000 Original-Received: from localhost ([127.0.0.1]:33695 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ecFpE-0000vY-32 for submit@debbugs.gnu.org; Thu, 18 Jan 2018 14:26:12 -0500 Original-Received: from mail-lf0-f47.google.com ([209.85.215.47]:36162) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ecFpC-0000vH-2E for 30106@debbugs.gnu.org; Thu, 18 Jan 2018 14:26:10 -0500 Original-Received: by mail-lf0-f47.google.com with SMTP id t79so12724525lfe.3 for <30106@debbugs.gnu.org>; Thu, 18 Jan 2018 11:26:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=dbu73V5nNugTocEZ1QdItSIxQ9b1PjGmFmQlX3IGxfg=; b=r8DrLrN7mOYHhxW6bASgtdLf4vvAnVcjUbOB8V3ZBOXnAlHamF8rEpl9c81l8RbQ7l EEa1MCd6oOqjupmDsXYaeSMJXi6pk9fHOOXBtTJW6VOdtKYOOGev5l3br6KqBDzCAiSO 3TemmfawOW/bTbJPkli2jYium9nyhfHU+iV1UgOuD3d+sHZSOIt7z7Cronp0lQkYZ8j8 LMsr9Bq4ZgHg0noMujfZ7k0LVlTOM1UJ4RUz+4TfhrZbvB6gG5nOuWiv1MtMgX0n1DYr 43PylK6OcAcXEmLQySW00GpRyAGJpVvGCBpBCsKJ59DfU7q6km1XG0lzf/kl0S/fbGTU EdKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=dbu73V5nNugTocEZ1QdItSIxQ9b1PjGmFmQlX3IGxfg=; b=CcYY5SpijCF9BnkS6uJHsJ5jV80zBR4DDUltmw6YYOB43qfWcA/i8T/zL2caMkr4Qu t9qJ47H6DqA7czQyKMsTGFPyU6BP+9WNlTpjOYsIeLjSdztRtI3oFAeeo1gc1rQBx4y6 X5MJ85cBM0suCt8C6YcJgwH7mTsnnl9AfsZmRE21bnZYJMMVVvj81AV91N0f1oLgXOsz rjwBWIvj+0JqhhbfmCHbnMzsgMkPaSAtUhWvnFOF1zSm7aBTDV+DrMbXNSHWZVRGSFkt FFuzP59NauglfL1sFExecDd/tgkynFmogDvqCV9FN/vDrqlNKPUgdl97Jti7qnsxr5UP AJhw== X-Gm-Message-State: AKwxytfveNr7SVuJr2Z30tVAoj4C0FUxYYhbCzQ+T31aNfguML51N1MB bm+9T4WET9hCI1dBVfp/KLJb0VryhQ3ULKt4ZWc= X-Google-Smtp-Source: ACJfBouhejGQ8sqC7UHV0fsZ0QMSvleQT//x/+VJHZySeN97omVvamz+B9r1qewPslXFc0cxfW0y0Vs0cu3JW02nykM= X-Received: by 10.46.15.2 with SMTP id 2mr3598849ljp.144.1516303563878; Thu, 18 Jan 2018 11:26:03 -0800 (PST) In-Reply-To: <83mv1bur66.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:142268 Archived-At: --f403043604144bf785056311efd1 Content-Type: text/plain; charset="UTF-8" Eli Zaretskii schrieb am Do., 18. Jan. 2018 um 16:23 Uhr: > > From: Philipp Stephani > > Date: Thu, 18 Jan 2018 14:23:03 +0000 > > Cc: phst@google.com, 30106@debbugs.gnu.org > > > > I'd prefer that the only file that calls systhread.c functions is > > thread.c; systhread.c is supposed to be low-level code concealed from > > application levels. So this would call for another level of > > indirection: add a new function to thread.c, and call that from > > emacs-module.c. > > > > Makes sense, I've moved in_current_thread to thread.c because it's > unrelated to modules. > > Thanks. > > > Otherwise, LGTM for master; thanks. > > > > Can we push this to emacs-26? Right now emacs-26 can't even be compiled > with --without-threads > > --with-modules (on some systems at least). > > How important is this? --with-modules is an opt-in switch, and the > default is to build with threads. So this sounds not very important > to me, and the change, although simple, is not really trivial, and > will affect any module. So I'm uneasy putting this on emacs-26, > especially since the Emacs 26.0.91 tarball is already ready and is > awaiting upload, so this will only go into the next pretest, which I > hoped could be a release candidate... > > Do you think leaving this for the next release will be so bad? > OK, pushed to master as 694ee38f8b. I don't expect this bug to cause correctness problems, even with the combination --without-threads --with-modules. The test is buggy, but it will only cause false positives with --module-assertions. That's annoying, but users can ignore these assertions. However, in the correct implementation, in_current_thread is effectively always true if threads are unavailable, so occasionally returning false is not a problem as far as modules are concerned. --f403043604144bf785056311efd1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


Eli Za= retskii <eliz@gnu.org> schrieb am= Do., 18. Jan. 2018 um 16:23=C2=A0Uhr:
> From: Philipp Stephani <p.stephani2@gmail.com>
> Date: Thu, 18 Jan 2018 14:23:03 +0000
> Cc: phst@google.c= om, 30106@de= bbugs.gnu.org
>
>=C2=A0 I'd prefer that the only file that calls systhread.c functio= ns is
>=C2=A0 thread.c; systhread.c is supposed to be low-level code concealed= from
>=C2=A0 application levels.=C2=A0 So this would call for another level o= f
>=C2=A0 indirection: add a new function to thread.c, and call that from<= br> >=C2=A0 emacs-module.c.
>
> Makes sense, I've moved in_current_thread to thread.c because it&#= 39;s unrelated to modules.

Thanks.

>=C2=A0 Otherwise, LGTM for master; thanks.
>
> Can we push this to emacs-26? Right now emacs-26 can't even be com= piled with --without-threads
> --with-modules (on some systems at least).

How important is this?=C2=A0 --with-modules is an opt-in switch, and the default is to build with threads.=C2=A0 So this sounds not very important to me, and the change, although simple, is not really trivial, and
will affect any module.=C2=A0 So I'm uneasy putting this on emacs-26, especially since the Emacs 26.0.91 tarball is already ready and is
awaiting upload, so this will only go into the next pretest, which I
hoped could be a release candidate...

Do you think leaving this for the next release will be so bad?

OK, pushed to master as=C2=A0=C2=A0694ee38f8b.

I don't expect this bug to cause correctness probl= ems, even with the combination --without-threads --with-modules. The test i= s buggy, but it will only cause false positives with --module-assertions. T= hat's annoying, but users can ignore these assertions. However, in the = correct implementation, in_current_thread is effectively always true if thr= eads are unavailable, so occasionally returning false is not a problem as f= ar as modules are concerned.
--f403043604144bf785056311efd1--