This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RE : Is JFFS2 thread-safe?


On Fri, 2003-11-28 at 11:27 +0000, David Woodhouse wrote:
> +#ifdef CYGPKG_KERNEL
> +#include <cyg/kernel/kapi.h>
> +#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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]