From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:50587) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QXDk0-0006F0-BW for qemu-devel@nongnu.org; Thu, 16 Jun 2011 10:40:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QXDjn-0005rQ-5W for qemu-devel@nongnu.org; Thu, 16 Jun 2011 10:40:15 -0400 Received: from mail-vw0-f45.google.com ([209.85.212.45]:45595) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QXDjm-0005rG-Rq for qemu-devel@nongnu.org; Thu, 16 Jun 2011 10:40:03 -0400 Received: by vws17 with SMTP id 17so7560vws.4 for ; Thu, 16 Jun 2011 07:40:01 -0700 (PDT) Sender: Richard Henderson Message-ID: <4DFA15B8.7090703@twiddle.net> Date: Thu, 16 Jun 2011 07:39:52 -0700 From: Richard Henderson MIME-Version: 1.0 References: <4DF9CD7E.5020509@siemens.com> In-Reply-To: <4DF9CD7E.5020509@siemens.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC][PATCH] Register Linux dyntick timer as per-thread signal List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: Paolo Bonzini , Anthony Liguori , qemu-devel , kvm , Sasha Levin 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~