This is the mail archive of the ecos-discuss@sourceware.org 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: newbie query! spinlocks mlqueue


On Wed, 21 Dec 2005, jeane wrote:

Thanks for the link I went through it, I'm new to ecos my assumption
was while using a spin-lock
[...]
I went through the spinlock's implementation on uni-processor I didn't
see any while loop /test_and_set instruction in Cyg_SpinLock::lock()
which will amount to the CPU spinning. Neither was there an
implementation which will disable scheduling. So how does the uni
-processor spin-lock guarantee "locking" across threads when
pre-emptible scheduling is enabled.

From the documentation: "Therefore spinlocks are only appropriate for SMP
systems where the current owner of a spinlock can continue running on a different processor."

-Hans

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


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