From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23709 invoked by alias); 27 Oct 2014 16:32:05 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 23698 invoked by uid 89); 27 Oct 2014 16:32:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: USMAMAIL.TILERA.COM Message-ID: <544E737E.7060206@tilera.com> Date: Mon, 27 Oct 2014 16:32:00 -0000 From: Chris Metcalf User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Andrew Pinski , Subject: Re: [PATCH 28/29] [AARCH64] Add typesizes.h for ILP32 References: <1414396793-9005-1-git-send-email-apinski@cavium.com> <1414396793-9005-29-git-send-email-apinski@cavium.com> In-Reply-To: <1414396793-9005-29-git-send-email-apinski@cavium.com> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2014-10/txt/msg00632.txt.bz2 On 10/27/2014 3:59 AM, Andrew Pinski wrote: > +# undef __SIGINFO_INNER > +# ifdef __AARCH64EB__ > +# define __SIGINFO_INNER(type, field) \ > + __extension__ struct { \ > + int __pad_##field; \ > + type field; \ > + } __attribute__((aligned(8) )) Since __SIGINFO_INNER is used for a bunch of non-siginfo purposes in this header, I think it would be clearer to define some more generic name (__TYPESIZES_PAD32 or whatever) and then use that name throughout. In fact I wonder if it would be clearer to require that type (bomb the typesizes.h headers) and just use it directly in places like the linux-generic "struct shmid_ds", etc. The "64-bit everywhere" model seems to be the new standard (x32 and now aarch64 compat) so we may want to think forward. A more standard macro model for this would also moot your __RUSAGE_LONG #ifndef (along with __SIGINFO_VOIDPTR, __SIGINFO_BAND, your hand-rolled "struct sigaltstack" and "struct ucontext", etc), and you could just directly use the now-standard macro in that spot. The more I think about it the more it seems like it does less damage to the header files to switch to a single common macro defined for all platforms that captures ILP32 and endianness conversions from kernel data structures. Arguably I should have done this originally for linux-generic, but now that we have another 32-bit case to handle here, I think it's time for a more general solution. > [...] > + > +#define __SIGSET_INNER_T __SYSCALL_ULONG_TYPE > +#define __FD_MASK_TYPE __SYSCALL_SLONG_TYPE > +#define __FD_MASK_CONST(a) (__extension__ a##ull) > +#endif Missing indent for these #defines. -- Chris Metcalf, Tilera Corp. http://www.tilera.com