openPOWERLINK_V2
openPOWERLINK_V2 copied to clipboard
Incorrect target_lock() implementation for ARM without OS in dual processor system
The target_lock() implementation in altera-c5socarm/lock-dualprocnoos.c is broken on SMP systems. For a primitive SMP lock, see:
https://en.wikipedia.org/wiki/Test_and_test-and-set
The xilinx-microblaze/lock-dualprocnoos.c and altera-nios2/lock-dualprocnoos.c seem to be copy and paste versions of this. They are also broken. At which level should the target_lock() ensure mutual exclusion? How is this related to dualprocshm_targetAcquireLock()?