From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/1305 Path: news.gmane.org!not-for-mail From: Gregor Richards Newsgroups: gmane.linux.lib.musl.general Subject: Re: thread local storage Date: Mon, 16 Jul 2012 14:57:22 -0400 Message-ID: <50046412.4060609@purdue.edu> References: <50046559.3090204@barfooze.de> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1342465058 4088 80.91.229.3 (16 Jul 2012 18:57:38 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 16 Jul 2012 18:57:38 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-1306-gllmg-musl=m.gmane.org@lists.openwall.com Mon Jul 16 20:57:38 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1SqqUB-0004mt-PI for gllmg-musl@plane.gmane.org; Mon, 16 Jul 2012 20:57:35 +0200 Original-Received: (qmail 25804 invoked by uid 550); 16 Jul 2012 18:57:35 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 25793 invoked from network); 16 Jul 2012 18:57:34 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.5) Gecko/20120624 Icedove/10.0.5 In-Reply-To: <50046559.3090204@barfooze.de> X-PMX-Version: 5.5.9.388399 X-PerlMx-Virus-Scanned: Yes Xref: news.gmane.org gmane.linux.lib.musl.general:1305 Archived-At: On 07/16/2012 03:02 PM, John Spencer wrote: > 2 out of 14 sabotage followers wanted to use a musl-based system as a > platform for luajit (and then were never seen again). > so i looked into adding it... > > luajit builds without problems on musl, but then crashes due to a lack > of TLS. > > is it planned to add this feature ? iirc it wasn't mentioned on the > latest roadmap... > > > With a quick perusal of the LuaJIT source, this is the only instance of TLS I see: #if LJ_UNWIND_EXT #if LJ_TARGET_OSX || defined(__OpenBSD__) /* Sorry, no thread safety for OSX. Complain to Apple, not me. */ static _Unwind_Exception static_uex; #else static __thread _Unwind_Exception static_uex; #endif Convince it to use the same exception as OS X and OpenBSD and you should be in business. "Complain to Apple, not me" is an odd way to say "I am too lazy to use standard interfaces." TLS has come up on the IRC chat, but I don't recall what the conclusions were regarding future implementation or not. With valediction, - Gregor Richards