From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Debugging Emacs with threads Date: Sun, 11 Dec 2016 20:12:12 +0200 Message-ID: <834m2ae3nn.fsf@gnu.org> References: <83inqqe8kb.fsf@gnu.org> <87pokyju0j.fsf@linux-m68k.org> <83eg1ee59i.fsf@gnu.org> <87h96ajqaj.fsf@linux-m68k.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1481479942 21066 195.159.176.226 (11 Dec 2016 18:12:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 11 Dec 2016 18:12:22 +0000 (UTC) Cc: tom@tromey.com, emacs-devel@gnu.org To: Andreas Schwab Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 11 19:12:18 2016 Return-path: Envelope-to: ged-emacs-devel@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 1cG8bh-0004mZ-Mq for ged-emacs-devel@m.gmane.org; Sun, 11 Dec 2016 19:12:17 +0100 Original-Received: from localhost ([::1]:56629 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cG8bl-0002hO-OK for ged-emacs-devel@m.gmane.org; Sun, 11 Dec 2016 13:12:21 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57211) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cG8bA-0002gi-KT for emacs-devel@gnu.org; Sun, 11 Dec 2016 13:11:45 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cG8b7-000664-Ef for emacs-devel@gnu.org; Sun, 11 Dec 2016 13:11:44 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45483) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cG8b7-000660-Bg; Sun, 11 Dec 2016 13:11:41 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3253 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cG8b5-0001lU-VL; Sun, 11 Dec 2016 13:11:41 -0500 In-reply-to: <87h96ajqaj.fsf@linux-m68k.org> (message from Andreas Schwab on Sun, 11 Dec 2016 19:04:20 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:210294 Archived-At: > From: Andreas Schwab > Cc: tom@tromey.com, emacs-devel@gnu.org > Date: Sun, 11 Dec 2016 19:04:20 +0100 > > On Dez 11 2016, Eli Zaretskii wrote: > > >> Why isn't current_thread a thread-local variable? > > > > I don't know. Is that sufficiently portable for us to use? > > If __thread isn't available it can simulated with pthread_getspecific. Btw, there are several places in thread.c which compare the value of current_thread with some other value. I guess these will have to be reviewed if current_thread is going to be in TLS. Tom, any comments? Thanks.