jeane <[EMAIL PROTECTED]> writes: > bonjour! > I was browsing through the code looking for implemantation pour the > spinlock in uni-processor modes. All it does is is add one to the > flag! What happens if there are two threads (with mlqueue based > scheduling preemption enabled) and thread A acquire spinlocks and gets > scheduled out and thread B tries to acquire the spinlock ? It look it > will acquire the spinlock :-S I miss something? how does spinlock > (cyg_spinlock_spin)disables scheduling? > Excuse my poor englais, any help will be grateful. > Thank you, > Jeane.
Take a look at the spinlock documentation, it explains there the situations in which spinlocks are appropriate and the potential pitfalls of using then inappropriately: http://ecos.sourceware.org/docs-latest/ref/kernel-spinlocks.html -- Nick Garnett eCos Kernel Architect http://www.ecoscentric.com The eCos and RedBoot experts -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
