This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Scheduler Lock without Kernel
- From: Martin Laabs <martin dot laabs at mailbox dot tu-dresden dot de>
- To: eCos Discuss <ecos-discuss at ecos dot sourceware dot org>
- Date: Tue, 01 Mar 2011 13:25:34 +0100
- Subject: [ECOS] Scheduler Lock without Kernel
- Reply-to: eCos Discuss <ecos-discuss at ecos dot sourceware dot org>
Hi,
I currently improve the Ethernet driver for the at91sam9 family of CPUs.
However - Since this CPU has a cache and is using DMA for data exchange
with the MAC I have to lock the scheduler while manipulating these memory
structures. (This is to ensure, that the cache is coherent while doing this
manipulations)
Since the code should run with the kernel as well without it I'd like to
know whether it's save to call the cyg_scheduler_lock without being in
kernel mode.
But I fear I have to write a macro that distinguish between "with kernel"
and "hal only". Am I right? Which symbol is best to distinguish between
thees two possibilities?
Thank you,
Martin laabs
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss