Michael Schnell wrote:
> Jamie Lokier wrote:
> > 
> > compare_exchange is a single architecture-specific instruction; that's
> > what we're discussing. 
> 
> Not really. The OP is working with Microblaze, I am working with NIOS2.
> Both archs do not have any provision for atomic memory modification at
> all, so we need to implement it by some pure software tricks (i.e.
> special provisions in the general ISR entry code) or by implementing a
> dedicated custom instruction.

Sorry, the topic wandered a bit, and *I* was talking about the
relative merits of atomic compare-exchange versus atomic
read-modify-write instruction... :-)

The general principle also applies to a custom instruction operating
on special registers - avoid spinning to implement the 'atomic' part,
and don't confuse that with spinning on a lock.  But it's not that
significant in the scheme of things.

-- Jamie
_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to