From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:39116) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QNWdO-0002uC-VX for qemu-devel@nongnu.org; Fri, 20 May 2011 16:49:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QNWdN-0004qR-Oo for qemu-devel@nongnu.org; Fri, 20 May 2011 16:49:22 -0400 Received: from mail-px0-f173.google.com ([209.85.212.173]:42571) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QNWdN-0004ps-Ax for qemu-devel@nongnu.org; Fri, 20 May 2011 16:49:21 -0400 Received: by pxi16 with SMTP id 16so2727603pxi.4 for ; Fri, 20 May 2011 13:49:20 -0700 (PDT) Sender: Richard Henderson Message-ID: <4DD6D3CE.1070701@twiddle.net> Date: Fri, 20 May 2011 13:49:18 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1305671572-5899-1-git-send-email-jcmvbkbc@gmail.com> <1305671572-5899-24-git-send-email-jcmvbkbc@gmail.com> <4DD68C41.8080201@twiddle.net> <201105210005.00438.jcmvbkbc@gmail.com> In-Reply-To: <201105210005.00438.jcmvbkbc@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 23/26] target-xtensa: implement interrupt option List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Filippov Cc: qemu-devel@nongnu.org On 05/20/2011 01:05 PM, Max Filippov wrote: > By the way, do I understand it right that if I chain TBs than I need > to periodically check for pending interrupts myself, otherwise e.g. > "j $" will create uninterruptible infinite loop? No, it won't. It'll create a loop, but it'll be broken by the host signal handler. Notice no other target is checking for this. >>> +DEF_HELPER_0(check_interrupts, void) >>> +DEF_HELPER_2(waiti, void, i32, i32) >>> +DEF_HELPER_2(timer_irq, void, i32, i32) >>> +DEF_HELPER_1(advance_ccount, void, i32) >> >> You shouldn't have to manage any of this from within the translator. You should *never* have to check for interrupts, or advance cycle counters, from within the translated code. Interrupt processing, and thus timers, are handled in between TBs as necessary by generic code. r~