From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28424 invoked by alias); 3 Jun 2005 09:37:45 -0000 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 Received: (qmail 28414 invoked by uid 22791); 3 Jun 2005 09:37:39 -0000 Received: from anchor-post-35.mail.demon.net (HELO anchor-post-35.mail.demon.net) (194.217.242.85) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Fri, 03 Jun 2005 09:37:39 +0000 Received: from calivar.demon.co.uk ([83.104.54.243] helo=xl5.calivar.com) by anchor-post-35.mail.demon.net with esmtp (Exim 4.42) id 1De8Yx-000GJ1-HD; Fri, 03 Jun 2005 09:33:59 +0000 Received: from xl5.calivar.com (localhost [127.0.0.1]) by xl5.calivar.com (Postfix) with ESMTP id 01FF42CFBA; Fri, 3 Jun 2005 10:37:35 +0100 (BST) To: Erik Christiansen Cc: ecos-discuss@ecos.sourceware.org References: <20050603084643.GC716@dd.nec.com.au> From: Nick Garnett Original-Sender: nickg@ecoscentric.com Date: Fri, 03 Jun 2005 09:37:00 -0000 In-Reply-To: <20050603084643.GC716@dd.nec.com.au> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [ECOS] Disabling interrupts when locking the scheduler X-SW-Source: 2005-06/txt/msg00022.txt.bz2 Erik Christiansen writes: > The possibility of disabling interrupts when locking the scheduler seems > built into the calling sequence: > > Cyg_Scheduler::lock() <-- Generates no code, anywhere. *1 > inc_sched_lock() > HAL_SMP_SCHEDLOCK_INC > HAL_DISABLE_INTERRUPTS <-- Disables interrupts, if invoked. > > While ref/kernel-interrupts.html confirms that interrupts are normally not > disabled, for improved interrupt latency, the code is there, if I can just > figure out how to turn it on. It's not conditionals, but seems to be > inheritance which causes Cyg_Scheduler::lock() to be excluded. > > Has anyone tried this before? > > (I'd prefer to enable the latent code, rather than just poke a > HAL_DISABLE_INTERRUPTS in front of Cyg_Scheduler::lock() in 66 > places, and repeat for enabling.) > > *1) No timeslicing, CYGSEM_HAL_USE_ROM_MONITOR == 1. Why do you want to do this? eCos is carefully designed not to disable interrupts unnecessarily. It will probably fail catastrophically if interrupts are disabled during the scheduler lock periods. The interrupt disable you have found is only part of the SMP code, and is matched by a HAL_RESTORE_INTERRUPTS() at the end of the HAL_SMP_SCHEDLOCK_INC() macro. So interrupts are disabled for a very short period, inside that macro. -- Nick Garnett eCos Kernel Architect http://www.ecoscentric.com The eCos and RedBoot experts -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss