Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp878610imm; Wed, 4 Jul 2018 07:31:26 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcNvH9gHv6z7VTWUz0QRwQmmPumAoH1+5bBl70l0+bWAAnzdCnsnnRNbiHDvLwTOIQTy0qV X-Received: by 2002:a63:195e:: with SMTP id 30-v6mr57458pgz.192.1530714686495; Wed, 04 Jul 2018 07:31:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530714686; cv=none; d=google.com; s=arc-20160816; b=zRiYBLYFZaLXAEz9pLDo2nAhNiX42iWarjx6VMXQmNt7p1rATFcJgAupqF9XX4TxET OXab94vEZnANkednZ/8gTjvvRQ7oSR23IXV91X9BbV6gRObFsOPNePUZLT16QecK4Rx/ ut0FjCAoQbVjKN/LMXe8umif24Hfzy/pQvOKTDp7dZ/cjQMYO377pq9wuHqRiEjej1JI 8MX2pXM5NIRAiNM3+j0XWcvDB8EsbIMSYQw8tNj1ScgD6sg+VT5uNEOgrIYszLh3t2qF LPZGZMIM5MOA/FkxE4+60BhO2llH1ihP9YAJ4vjmSffpjRXG7ukMkL16fs1rTNXREEMf EtCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=aQ1YY9uC1SGEsya8X77fxpjs3TwgeqaYqJ/FUuA6mWc=; b=Vuwlh5SWPPC4pkYkXryq+3gLRNMjBAg+cgLbE7OMlL15ahqYLauteSJf1BLNJeVBxp VXw+CMJVFCCGTHolg6WjECIFQnnJGRnzHE7oa/gH4Ng+ZgpH9yAO7JhXBVQKeIIYLC7z TWLLuF8qWyW1vIAEah+P6leNDHmLCczK7hShL1iLpTPV0TWzCguncl0OKBvwhES891Ca lHLp092D3mfW3a6871GGHKpHrY3bF5gQJsf1y6wBdKJWSGBJpc3VQq5cHvsSR9n6y9kP 7PutAEIY36+OVNHnZbpHEX39wn9j07rHv257VD44YtlnGbDwRV8eNWx2kNgQNE/tfUnj S40Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o61-v6si3650517pld.109.2018.07.04.07.31.11; Wed, 04 Jul 2018 07:31:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752136AbeGDOa2 (ORCPT + 99 others); Wed, 4 Jul 2018 10:30:28 -0400 Received: from rhlx01.hs-esslingen.de ([129.143.116.10]:52554 "EHLO rhlx01.hs-esslingen.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752165AbeGDOa0 (ORCPT ); Wed, 4 Jul 2018 10:30:26 -0400 X-Greylist: delayed 548 seconds by postgrey-1.27 at vger.kernel.org; Wed, 04 Jul 2018 10:30:25 EDT Received: by rhlx01.hs-esslingen.de (Postfix, from userid 1203) id 83F0F2244669; Wed, 4 Jul 2018 16:21:16 +0200 (CEST) Date: Wed, 4 Jul 2018 16:21:16 +0200 From: Adrian Reber To: Christoph Hellwig Cc: viro@zeniv.linux.org.uk, Avi Kivity , linux-aio@kvack.org, linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 7/7] aio: implement io_pgetevents Message-ID: <20180704142116.GM17048@lisas.de> References: <20180502211448.18276-1-hch@lst.de> <20180502211448.18276-8-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180502211448.18276-8-hch@lst.de> X-Url: X-Operating-System: Linux (4.14.16-300.fc27.x86_64) X-Load-Average: 4.97 4.97 4.66 X-Unexpected: The Spanish Inquisition X-GnuPG-Key: gpg --recv-keys D3C4906A User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 02, 2018 at 11:14:48PM +0200, Christoph Hellwig wrote: > This is the io_getevents equivalent of ppoll/pselect and allows to > properly mix signals and aio completions (especially with IOCB_CMD_POLL) > and atomically executes the following sequence: > > sigset_t origmask; > > pthread_sigmask(SIG_SETMASK, &sigmask, &origmask); > ret = io_getevents(ctx, min_nr, nr, events, timeout); > pthread_sigmask(SIG_SETMASK, &origmask, NULL); > > Note that unlike many other signal related calls we do not pass a sigmask > size, as that would get us to 7 arguments, which aren't easily supported > by the syscall infrastructure. It seems a lot less painful to just add a > new syscall variant in the unlikely case we're going to increase the > sigset size. Starting with this commit following code does not compile for me anymore: #include #include int main() { return 0; } In file included from /usr/include/linux/signal.h:5, from /usr/include/linux/aio_abi.h:32, from include.c:2: /usr/include/asm/signal.h:16:23: error: conflicting types for ‘sigset_t’ typedef unsigned long sigset_t; ^~~~~~~~ In file included from /usr/include/signal.h:35, from include.c:1: /usr/include/bits/types/sigset_t.h:7:20: note: previous declaration of ‘sigset_t’ was here typedef __sigset_t sigset_t; ^~~~~~~~ In file included from /usr/include/linux/signal.h:5, from /usr/include/linux/aio_abi.h:32, from include.c:2: /usr/include/asm/signal.h:115:8: error: redefinition of ‘struct sigaction’ struct sigaction { ^~~~~~~~~ In file included from /usr/include/signal.h:226, from include.c:1: /usr/include/bits/sigaction.h:27:8: note: originally defined here struct sigaction ^~~~~~~~~ [and much more] Before this commit it compiles without errors. Adrian