From patchwork Mon Oct 27 07:59:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Pinski X-Patchwork-Id: 39576 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 49F642118A for ; Mon, 27 Oct 2014 08:02:32 +0000 (UTC) Received: by mail-la0-f72.google.com with SMTP id mc6sf739535lab.7 for ; Mon, 27 Oct 2014 01:02:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:mailing-list :precedence:list-id:list-unsubscribe:list-subscribe:list-archive :list-post:list-help:sender:delivered-to:from:to:cc:subject:date :message-id:in-reply-to:references:x-original-sender :x-original-authentication-results; bh=JaNkkO6ENnDXaGa4nVChc3UfsXOnYUkE+T716yx8xJo=; b=kX7pAqJlvB8sicRu/+cLecJ0wlgTO6pPN0XfFQDsnL91brLdW7fFDst3fBByyvA4Y3 HMhig2uCLENbXJ/Za2oCE+RgbfWLwZZUfWzpEl7RarZePQ2LkzZW042wxN4dqyoCZwOY 4yQUgPYcay3rld9Sg20+Wr39+yivFF3KcrmikcKzZPDDZ1/Th+z5mw/Zt/t1Pp8hSTtk 34IUXJDnTb7MIZqiHlmEk6xPn1WSHEP4ryAAdt54ulsWqC+2ujHdxQi/VBg0IEd3c5vH gsoQIIsWiYvIziCu5OcOm/5kgtJ9nPd02E3IWiVr/EfHPTo96ajU42fCKzvhX+Lj0Cwq hzVQ== X-Gm-Message-State: ALoCoQlidvyEJydZyukx3yEgzeWRajqlCizfteEKVJfkHWaIc7XZ+iBxUp62vCsmDtKILEXuGByT X-Received: by 10.194.241.232 with SMTP id wl8mr74465wjc.5.1414396950981; Mon, 27 Oct 2014 01:02:30 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.19.39 with SMTP id b7ls287858lae.38.gmail; Mon, 27 Oct 2014 01:02:30 -0700 (PDT) X-Received: by 10.153.7.170 with SMTP id dd10mr21745426lad.45.1414396950774; Mon, 27 Oct 2014 01:02:30 -0700 (PDT) Received: from mail-la0-x236.google.com (mail-la0-x236.google.com. [2a00:1450:4010:c03::236]) by mx.google.com with ESMTPS id aq3si18656247lbc.78.2014.10.27.01.02.30 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 27 Oct 2014 01:02:30 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::236 as permitted sender) client-ip=2a00:1450:4010:c03::236; Received: by mail-la0-f54.google.com with SMTP id gm9so5384507lab.13 for ; Mon, 27 Oct 2014 01:02:30 -0700 (PDT) X-Received: by 10.112.97.135 with SMTP id ea7mr21853705lbb.46.1414396950322; Mon, 27 Oct 2014 01:02:30 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.84.229 with SMTP id c5csp247448lbz; Mon, 27 Oct 2014 01:02:28 -0700 (PDT) X-Received: by 10.68.225.99 with SMTP id rj3mr22680497pbc.97.1414396946998; Mon, 27 Oct 2014 01:02:26 -0700 (PDT) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id aj8si9805111pad.241.2014.10.27.01.02.26 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Oct 2014 01:02:26 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-53808-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 15917 invoked by alias); 27 Oct 2014 08:00:17 -0000 Mailing-List: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org Precedence: list List-Id: List-Unsubscribe: , List-Subscribe: List-Archive: List-Post: , List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 15273 invoked by uid 89); 27 Oct 2014 08:00:00 -0000 X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-HELO: mail-ig0-f176.google.com X-Received: by 10.50.3.97 with SMTP id b1mr20300825igb.12.1414396797582; Mon, 27 Oct 2014 00:59:57 -0700 (PDT) From: Andrew Pinski To: libc-alpha@sourceware.org Cc: Andrew Pinski Subject: [PATCH 02/29] Allow sigset be an array of a different type Date: Mon, 27 Oct 2014 00:59:26 -0700 Message-Id: <1414396793-9005-3-git-send-email-apinski@cavium.com> In-Reply-To: <1414396793-9005-1-git-send-email-apinski@cavium.com> References: <1414396793-9005-1-git-send-email-apinski@cavium.com> X-Original-Sender: apinski@cavium.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::236 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@sourceware.org X-Google-Group-Id: 836684582541 For AARCH64 ILP32, sigset needs to be an array of unsigned long long as it needs to be 64bit to match AARCH64 lP64. * sysdeps/unix/sysv/linux/bits/sigset.h: Include bits/types.h. (__sigset_inner_t): New typedef. (_SIGSET_NWORDS): Use __sigset_inner_t instead of unsigned long. (__sigset_t): Likewise. (__sigmask): Likewise. (__sigword): Likewise. (__SIGSETFN): Likewise. --- sysdeps/unix/sysv/linux/bits/sigset.h | 20 ++++++++++++++------ 1 files changed, 14 insertions(+), 6 deletions(-) diff --git a/sysdeps/unix/sysv/linux/bits/sigset.h b/sysdeps/unix/sysv/linux/bits/sigset.h index af4ae83..4648e7b 100644 --- a/sysdeps/unix/sysv/linux/bits/sigset.h +++ b/sysdeps/unix/sysv/linux/bits/sigset.h @@ -19,14 +19,22 @@ #ifndef _SIGSET_H_types # define _SIGSET_H_types 1 +#include + typedef int __sig_atomic_t; +#ifndef __SIGSET_INNER_T +typedef unsigned long __sigset_inner_t; +#else +typedef __SIGSET_INNER_T __sigset_inner_t; +#endif + /* A `sigset_t' has a bit for each signal. */ -# define _SIGSET_NWORDS (1024 / (8 * sizeof (unsigned long int))) +# define _SIGSET_NWORDS (1024 / (8 * sizeof (__sigset_inner_t))) typedef struct { - unsigned long int __val[_SIGSET_NWORDS]; + __sigset_inner_t __val[_SIGSET_NWORDS]; } __sigset_t; #endif @@ -47,10 +55,10 @@ typedef struct /* Return a mask that includes the bit for SIG only. */ # define __sigmask(sig) \ - (((unsigned long int) 1) << (((sig) - 1) % (8 * sizeof (unsigned long int)))) + (((__sigset_inner_t) 1) << (((sig) - 1) % (8 * sizeof (__sigset_inner_t)))) /* Return the word index for SIG. */ -# define __sigword(sig) (((sig) - 1) / (8 * sizeof (unsigned long int))) +# define __sigword(sig) (((sig) - 1) / (8 * sizeof (__sigset_inner_t))) # if defined __GNUC__ && __GNUC__ >= 2 # define __sigemptyset(set) \ @@ -108,8 +116,8 @@ extern int __sigdelset (__sigset_t *, int); _EXTERN_INLINE int \ NAME (CONST __sigset_t *__set, int __sig) \ { \ - unsigned long int __mask = __sigmask (__sig); \ - unsigned long int __word = __sigword (__sig); \ + __sigset_inner_t __mask = __sigmask (__sig); \ + __sigset_inner_t __word = __sigword (__sig); \ return BODY; \ }