This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Scheduler locking and SMP?
- From: Stanislav Meduna <stano at meduna dot org>
- To: eCos Discussion <ecos-discuss at ecos dot sourceware dot org>
- Date: Mon, 06 Sep 2010 13:11:02 +0200
- Subject: [ECOS] Scheduler locking and SMP?
Hi,
does the cyg_scheduler_lock() prevent multiple threads
entering the guarded section on a SMP machine, or is
an additional spinlock needed?
I need a lightweight lock-free way of protecting data
manipulated by very short sections of code (several
instructions, no eCos API calls there) such as enqueuing
something into a linked list, so a full-blown mutex
is not what I want. I don't need to access this data
from an ISR or DSR context and contention is very rare.
Right now I don't have any SMP machine to experiment on,
but the code should be SMP-safe in the future.
Thanks
--
Stano
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss