From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12183 invoked by alias); 10 Apr 2006 10:44:22 -0000 Received: (qmail 12175 invoked by uid 22791); 10 Apr 2006 10:44:21 -0000 X-Spam-Check-By: sourceware.org Received: from javad.com (HELO javad.com) (216.122.176.236) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 10 Apr 2006 10:44:19 +0000 Received: from osv ([87.236.81.130]) by javad.com (8.11.6/8.11.0) with ESMTP id k3AAiGd06664; Mon, 10 Apr 2006 10:44:17 GMT (envelope-from s.organov@javad.com) Received: from osv by osv with local (Exim 4.60) (envelope-from ) id 1FStsQ-0001lS-NQ; Mon, 10 Apr 2006 14:44:10 +0400 From: Sergei Organov To: ecos-discuss@ecos.sourceware.org Cc: Nick Garnett References: <20060406211847.GH12221@lunn.ch> <20060409123238.GS12221@lunn.ch> Date: Mon, 10 Apr 2006 10:44:00 -0000 In-Reply-To: (Nick Garnett's message of "10 Apr 2006 10:36:08 +0100") Message-ID: <8764lhbthh.fsf@javad.com> User-Agent: Gnus/5.110004 (No Gnus v0.4) XEmacs/21.4.18 (linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] Re: DSR stops running after heavy interrupts. Bug found? X-SW-Source: 2006-04/txt/msg00111.txt.bz2 Nick Garnett writes: > Sergei Organov writes: > >> Andrew Lunn writes: >> >> [...] >> >> > However, from what you are saying it sounds like there needs to be >> > another comparison afterwards. Something like: >> > >> > and r0,r0,#2 // CYG_ISR_CALL_DSR >> > beq 17f >> >> No, bit checking of the ISR return value is performed inside the >> interrupt_end() routine: >> >> if( isr_ret & Cyg_Interrupt::CALL_DSR && intr != NULL ) intr->post_dsr() > > > Exactly. And there are other housekeeping things that go on in > interrupt_end() which cannot be skipped. The most important of these > is decrementing the scheduler lock. > > I don't really see how the original poster's problem is fixed by > trying to skip interrupt_end(), I would only expect doing that to > aggravate the problem. The scheduler lock is acquired early in > interrupt processing -- before the ISR is called and we know whether > there is a DSR to call. interrupt_end() decrements the scheduler lock > and as a side-effect may cause any DSRs to be called. A little OT while we are at interrupt_end(). Could you please explain why #ifdef CYGPKG_KERNEL_SMP_SUPPORT Cyg_Scheduler::lock(); #endif is there at the beginning, -- looks like extra scheduler lock without corresponding unlock for SMP case. If not a bug, it seems a comment would be nice to have there. -- Sergei. -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss