From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/6827 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Custom __set_thread_area for ARM Date: Tue, 13 Jan 2015 22:09:46 -0500 Message-ID: <20150114030946.GL4574@brightrain.aerifal.cx> References: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1421205010 27521 80.91.229.3 (14 Jan 2015 03:10:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 14 Jan 2015 03:10:10 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-6840-gllmg-musl=m.gmane.org@lists.openwall.com Wed Jan 14 04:10:03 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1YBELL-000884-7Z for gllmg-musl@m.gmane.org; Wed, 14 Jan 2015 04:10:03 +0100 Original-Received: (qmail 3580 invoked by uid 550); 14 Jan 2015 03:09:57 -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 3572 invoked from network); 14 Jan 2015 03:09:56 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:6827 Archived-At: On Tue, Jan 13, 2015 at 11:19:44PM +0300, Oleg Ranevskyy wrote: > Dear community, > > Musl has a generic implementation of the __set_thread_area function in > src/thread/__set_thread_area.c. It is not used for ARM though. There is a > custom ARM implementation in src/thread/arm/__set_thread_area.s. > > Would you be able to clarify the following question please? > Why musl doesn't define SYS_set_thread_area for ARM to utilize the generic > function and uses custom __set_thread_area instead? The ARM kernel does not implement SYS_set_thread_area. Instead it provides an ARM-specific syscall. The asm file you're looking at uses that instead. BTW, this code is replaced in git master and the pending 1.1.6 release. It's part of the ARM atomics/TLS access overhaul. Rich