[ECOS] RE : [ECOS] Is JFFS2 thread-safe?

David Woodhouse dwmw2@infradead.org
Fri Nov 28 16:09:00 GMT 2003

On Fri, 2003-11-28 at 11:27 +0000, David Woodhouse wrote:
> +#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?


Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

More information about the Ecos-discuss mailing list