From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12142 invoked by alias); 28 Nov 2003 16:09:22 -0000 Mailing-List: contact ecos-discuss-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@sources.redhat.com Received: (qmail 12112 invoked from network); 28 Nov 2003 16:09:17 -0000 Received: from unknown (HELO pentafluge.infradead.org) (213.86.99.235) by sources.redhat.com with SMTP; 28 Nov 2003 16:09:17 -0000 Received: from fish.redhat.com ([213.86.99.237] helo=[172.16.18.64]) by pentafluge.infradead.org with asmtp (Exim 4.22 #5 (Red Hat Linux)) id 1APlCb-00045V-Pp; Fri, 28 Nov 2003 16:10:41 +0000 From: David Woodhouse To: Vincent Catros Cc: ecos-discuss@sources.redhat.com In-Reply-To: <1070018876.10048.35.camel@hades.cambridge.redhat.com> References: <000001c3b4c7$023894e0$7407a8c0@figuier> <1070018075.10048.29.camel@hades.cambridge.redhat.com> <1070018876.10048.35.camel@hades.cambridge.redhat.com> Content-Type: text/plain Message-Id: <1070035746.13188.17.camel@hades.cambridge.redhat.com> Mime-Version: 1.0 Date: Fri, 28 Nov 2003 16:09:00 -0000 Content-Transfer-Encoding: 7bit X-SA-Exim-Mail-From: dwmw2@infradead.org X-SA-Exim-Scanned: No; SAEximRunCond expanded to false X-Pentafluge-Mail-From: Subject: Re: [ECOS] RE : [ECOS] Is JFFS2 thread-safe? X-SW-Source: 2003-11/txt/msg00429.txt.bz2 On Fri, 2003-11-28 at 11:27 +0000, David Woodhouse wrote: > +#ifdef CYGPKG_KERNEL > +#include > +#define spin_lock(lock) cyg_scheduler_lock() > +#define spin_unlock(lock) cyg_scheduler_unlock() > +#define spin_lock_bh(lock) cyg_scheduler_lock() > +#define spin_unlock_bh(lock) cyg_scheduler_unlock() Hmmm. I forgot eCos now had SMP support, and has its own spinlocks. Can't say I much like the idea of putting in a #define to call a C function which is a wrapper around a C++ class which in turn is a wrapper round the original HAL functions... or in fact in the common case is just a dummy counter which doesn't actually lock the scheduler to avoid preemption... is that intentional? -- dwmw2 -- Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos and search the list archive: http://sources.redhat.com/ml/ecos-discuss