ARM cortex: mutex using bit banding
Posted
by Jeff V
on Stack Overflow
See other posts from Stack Overflow
or by Jeff V
Published on 2010-05-18T13:01:55Z
Indexed on
2010/05/21
15:20 UTC
Read the original article
Hit count: 362
Given that, on the ARM Cortex M3, I can:
atomically read a single bit atomically set a single bit atomically clear a single bit
How can I combine these for a mutex style set of operations:
try lock take lock release lock
It seems that try_lock or take_lock would require two operations that would not be atomic.
Do I need more control to accomplish this? Disable global interrupts would do it but it seems there should be a more surgical approach.
© Stack Overflow or respective owner