From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Barry OReilly Newsgroups: gmane.emacs.devel Subject: Re: the state of the concurrency branch Date: Wed, 16 Oct 2013 16:25:04 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e01184a9214cd5004e8e17fda X-Trace: ger.gmane.org 1381955112 24565 80.91.229.3 (16 Oct 2013 20:25:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 16 Oct 2013 20:25:12 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 16 22:25:14 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VWXeZ-0005o1-AB for ged-emacs-devel@m.gmane.org; Wed, 16 Oct 2013 22:25:11 +0200 Original-Received: from localhost ([::1]:49240 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VWXeY-0002Vj-NP for ged-emacs-devel@m.gmane.org; Wed, 16 Oct 2013 16:25:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42058) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VWXeU-0002TB-E1 for emacs-devel@gnu.org; Wed, 16 Oct 2013 16:25:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VWXeT-0006e1-5P for emacs-devel@gnu.org; Wed, 16 Oct 2013 16:25:06 -0400 Original-Received: from mail-oa0-x232.google.com ([2607:f8b0:4003:c02::232]:55547) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VWXeT-0006bU-06 for emacs-devel@gnu.org; Wed, 16 Oct 2013 16:25:05 -0400 Original-Received: by mail-oa0-f50.google.com with SMTP id j1so1179173oag.9 for ; Wed, 16 Oct 2013 13:25:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=efPIeIHTWdoHEH0IOEZCFksY0ihJT38TY6jwVWYwINQ=; b=sFJ+69ECP0z9rm2UImFrAf+DxiE2kDzaAEUDYvg3v14sLMWHUoFFRX89u0OSfPcaNy Qtwse/rC7cmjF9TndseV2GkEmt/icqzI9jTAP4d8fzFnu69cHEJjLudAmnTUnJ2GBfh9 UFK+dhYmyNa2S7mXSdkU4iicv5qyKOXdwNJCbzewfN3uwUrscOKC7PZXNEmdCAt5sS7d jcI2H09yF7cBB/7xRdO+5Oui+7Adt7HATofUi5DThSNz+ug4rFTus34Qz0kAY6ojPUSA XI5cfjuaTwlJUjMQenTihO/IGTv9Y5c75AdN+EHA6W1j60/zZZckUL87/clk1tmwWBKW Ux0g== X-Received: by 10.182.88.129 with SMTP id bg1mr7691706obb.36.1381955104195; Wed, 16 Oct 2013 13:25:04 -0700 (PDT) Original-Received: by 10.76.156.103 with HTTP; Wed, 16 Oct 2013 13:25:04 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c02::232 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:164253 Archived-At: --089e01184a9214cd5004e8e17fda Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Mimicing the style found elsewhere: diff --git a/src/eval.c b/src/eval.c index b8a6159..fc16c15 100644 --- a/src/eval.c +++ b/src/eval.c @@ -3488,9 +3488,9 @@ unbind_for_thread_switch (struct thread_state *thr) { union specbinding *bind; - for (bind =3D thr->m_specpdl_ptr; bind !=3D thr->m_specpdl; --bind) + for (bind =3D thr->m_specpdl_ptr; bind > thr->m_specpdl;) { - if (bind->kind >=3D SPECPDL_LET) + if ((--bind)->kind >=3D SPECPDL_LET) { bind->let.saved_value =3D find_symbol_value (specpdl_symbol (bind= )); do_one_unbind (bind, 0); With this I can eval the progn many times. I'm not sure why it's 23 the first time, then "23 (#o27, #x17, ?\C-w)" all subsequent times: 23 23 (#o27, #x17, ?\C-w) [3 times] A couple other comments on the concurrency branch: =95 thread-yield should call timer_check. See discussion at: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D15045#176 =95 condition-variablep should be condition-variable-p --089e01184a9214cd5004e8e17fda Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable
Mimicing the style found elsewhere:

diff --git a/sr= c/eval.c b/src/eval.c
index b8a6159..fc16c15 100644
--- a/src/eval.c<= br>+++ b/src/eval.c
@@ -3488,9 +3488,9 @@ unbind_for_thread_switch (stru= ct thread_state *thr)
=A0{
=A0=A0 union specbinding *bind;
=A0
-=A0 for (bind =3D thr-&g= t;m_specpdl_ptr; bind !=3D thr->m_specpdl; --bind)
+=A0 for (bind =3D= thr->m_specpdl_ptr; bind > thr->m_specpdl;)
=A0=A0=A0=A0 {
= -=A0=A0=A0=A0=A0 if (bind->kind >=3D SPECPDL_LET)
+=A0=A0=A0=A0=A0 if ((--bind)->kind >=3D SPECPDL_LET)
=A0=A0=A0=A0= =A0=A0=A0 {
=A0=A0=A0=A0=A0=A0=A0=A0=A0 bind->let.saved_value =3D fin= d_symbol_value (specpdl_symbol (bind));
=A0=A0=A0=A0=A0=A0=A0=A0=A0 do_o= ne_unbind (bind, 0);

With this I can eval the progn many times. I= 9;m not sure why it's 23
the first time, then "23 (#o27, #x17, ?\C-w)" all subsequent time= s:

=A0 23
=A0 23 (#o27, #x17, ?\C-w) [3 times]

A couple ot= her comments on the concurrency branch:

=A0 =95 thread-yield should = call timer_check. See discussion at:
=A0=A0=A0 http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D15045#176

=A0= =95 condition-variablep should be condition-variable-p

--089e01184a9214cd5004e8e17fda--