From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Henderson Subject: Re: [Qemu-devel] [RFC][PATCH] Register Linux dyntick timer as per-thread signal Date: Thu, 16 Jun 2011 07:39:52 -0700 Message-ID: <4DFA15B8.7090703@twiddle.net> References: <4DF9CD7E.5020509@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: qemu-devel , Anthony Liguori , Paolo Bonzini , Sasha Levin , kvm To: Jan Kiszka Return-path: Received: from mail-vw0-f46.google.com ([209.85.212.46]:34574 "EHLO mail-vw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932067Ab1FPOkC (ORCPT ); Thu, 16 Jun 2011 10:40:02 -0400 Received: by vws1 with SMTP id 1so1201622vws.19 for ; Thu, 16 Jun 2011 07:40:01 -0700 (PDT) In-Reply-To: <4DF9CD7E.5020509@siemens.com> Sender: kvm-owner@vger.kernel.org List-ID: On 06/16/2011 02:31 AM, Jan Kiszka wrote: > ev.sigev_value.sival_int = 0; > - ev.sigev_notify = SIGEV_SIGNAL; > ev.sigev_signo = SIGALRM; > +#ifdef SIGEV_THREAD_ID > + if (qemu_signalfd_available()) { > + ev.sigev_notify = SIGEV_THREAD_ID; > + ev._sigev_un._tid = qemu_get_thread_id(); > + } else > +#endif /* SIGEV_THREAD_ID */ > + { > + ev.sigev_notify = SIGEV_SIGNAL; > + } > Rather than do the else-inside-ifdef thing, why not leave the original setting of sigev_notify where it was, and let the ifdef overwrite it? r~