From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 16 Jan 2015 16:05:52 +0100 (CET) Received: from unicorn.mansr.com ([81.2.72.234]:35690 "EHLO unicorn.mansr.com" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S27010525AbbAPPFvMVXu0 convert rfc822-to-8bit (ORCPT ); Fri, 16 Jan 2015 16:05:51 +0100 Received: by unicorn.mansr.com (Postfix, from userid 51770) id 64EA71538A; Fri, 16 Jan 2015 15:05:44 +0000 (GMT) From: =?iso-8859-1?Q?M=E5ns_Rullg=E5rd?= To: Ralf Baechle Cc: Daniel Sanders , David Daney , Sergei Shtylyov , "linux-mips\@linux-mips.org" , Paul Burton , Markos Chandras , James Hogan , Behan Webster Subject: Re: [PATCH] MIPS: Changed current_thread_info() to an equivalent supported by both clang and GCC References: <1420805177-9087-1-git-send-email-daniel.sanders@imgtec.com> <54AFC6F3.1020300@cogentembedded.com> <54B00F3C.8030903@gmail.com> <54B069D4.4090608@gmail.com> <20150116143725.GB22296@linux-mips.org> Date: Fri, 16 Jan 2015 15:05:44 +0000 In-Reply-To: <20150116143725.GB22296@linux-mips.org> (Ralf Baechle's message of "Fri, 16 Jan 2015 15:37:25 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 45228 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: mans@mansr.com Precedence: bulk List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: linux-mips X-List-ID: linux-mips List-subscribe: List-owner: List-post: List-archive: X-list: linux-mips Ralf Baechle writes: > On Sat, Jan 10, 2015 at 12:53:22PM +0000, Daniel Sanders wrote: > >> The main reason I renamed it is that identifiers starting with '__' >> are reserved. It's pretty unlikely but it's possible that the name >> will conflict with a C implementation in the future. > > The whole kernel is using identifiers starting with a double underscore > left and right. The risk should be acceptable though - also because the > kernel isn't linked against external libraries. The reserved namespace applies to applications built against a standard library so as to avoid name clashes with library internals. The kernel doesn't use the standard library, so it can use any identifiers. This should be clear from the fact that the reserved identifiers are listed in the "Library" chapter of the C standard. -- Måns Rullgård mans@mansr.com From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from unicorn.mansr.com ([81.2.72.234]:35690 "EHLO unicorn.mansr.com" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S27010525AbbAPPFvMVXu0 convert rfc822-to-8bit (ORCPT ); Fri, 16 Jan 2015 16:05:51 +0100 From: =?iso-8859-1?Q?M=E5ns_Rullg=E5rd?= Subject: Re: [PATCH] MIPS: Changed current_thread_info() to an equivalent supported by both clang and GCC References: <1420805177-9087-1-git-send-email-daniel.sanders@imgtec.com> <54AFC6F3.1020300@cogentembedded.com> <54B00F3C.8030903@gmail.com> <54B069D4.4090608@gmail.com> <20150116143725.GB22296@linux-mips.org> Date: Fri, 16 Jan 2015 15:05:44 +0000 In-Reply-To: <20150116143725.GB22296@linux-mips.org> (Ralf Baechle's message of "Fri, 16 Jan 2015 15:37:25 +0100") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT Return-Path: Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-subscribe: List-owner: List-post: List-archive: To: Ralf Baechle Cc: Daniel Sanders , David Daney , Sergei Shtylyov , "linux-mips@linux-mips.org" , Paul Burton , Markos Chandras , James Hogan , Behan Webster Message-ID: <20150116150544.HPlbklghuxbbhBnuvXjwpubG8AxxdFsHbSvJFSNwcUI@z> Ralf Baechle writes: > On Sat, Jan 10, 2015 at 12:53:22PM +0000, Daniel Sanders wrote: > >> The main reason I renamed it is that identifiers starting with '__' >> are reserved. It's pretty unlikely but it's possible that the name >> will conflict with a C implementation in the future. > > The whole kernel is using identifiers starting with a double underscore > left and right. The risk should be acceptable though - also because the > kernel isn't linked against external libraries. The reserved namespace applies to applications built against a standard library so as to avoid name clashes with library internals. The kernel doesn't use the standard library, so it can use any identifiers. This should be clear from the fact that the reserved identifiers are listed in the "Library" chapter of the C standard. -- Måns Rullgård mans@mansr.com