Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NwOtC-0001ES-BI for qemu-devel@nongnu.org; Mon, 29 Mar 2010 20:01:02 -0400 Received: from [140.186.70.92] (port=59430 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NwOt9-0001E8-5l for qemu-devel@nongnu.org; Mon, 29 Mar 2010 20:01:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NwOt3-0005SC-Rv for qemu-devel@nongnu.org; Mon, 29 Mar 2010 20:00:59 -0400 Received: from mail2.shareable.org ([80.68.89.115]:48420) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NwOt3-0005QB-J5 for qemu-devel@nongnu.org; Mon, 29 Mar 2010 20:00:53 -0400 Date: Tue, 30 Mar 2010 01:00:39 +0100 From: Jamie Lokier Subject: Re: [Qemu-devel] Re: [PATCH 1/5] linux-user/ia64: workaround ia64 strangenesses Message-ID: <20100330000039.GH9876@shareable.org> References: <1269822354-4878-1-git-send-email-aurelien@aurel32.net> <1269822354-4878-2-git-send-email-aurelien@aurel32.net> <4BB074B2.4090209@redhat.com> <20100329162527.GD13677@hall.aurel32.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100329162527.GD13677@hall.aurel32.net> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Aurelien Jarno Cc: Paolo Bonzini , qemu-devel@nongnu.org Aurelien Jarno wrote: > On Mon, Mar 29, 2010 at 11:36:50AM +0200, Paolo Bonzini wrote: > > > >> +#ifdef __ia64 > >> + sigprocmask(SIG_SETMASK, (sigset_t *)&uc->uc_sigmask, NULL); > >> +#else > >> sigprocmask(SIG_SETMASK,&uc->uc_sigmask, NULL); > >> +#endif > > > > Any reason for the ifdef? > > > > It is not strictly needed, as all architectures can cope with the ia64 > version. I have added it to make sure that a new architecture triggers a > warning if uc->uc_sigmask is not of type sigset_t, so that a human can > verify the cast is correct. What type is the ia64 uc_sigmask, if not sigset_t? A git grep of the kernel found only: arch/ia64/include/asm/ucontext.h:#define uc_sigmask uc_mcontext.sc_sigmask with sc_sigmask not defined anywhere. The uc_mcontext.sc_mask field, though, is a sigset_t. -- Jamie