Wrong spinlock implementation for Tricore?
Posted: Tue Mar 15, 2016 2:34 pm
Hi all,
I'm facing some problem using "EE_tc_sync_barrier" to synchronize the task execution.
Can that function be used inside tasks or just in the kernel?
I'd just like to be sure the spinlock mechanism, used in barriers, has been correctly implemented.
The current implementation rely on the atomicity of the CMPSWAP.W instruction, but this information is missing in the instruction set manual.
Conversely, the manual claims the atomicity for the LDMST and SWAP.W instructions.
Could someone confirm this?
Thanks in advance,
Davide
I'm facing some problem using "EE_tc_sync_barrier" to synchronize the task execution.
Can that function be used inside tasks or just in the kernel?
I'd just like to be sure the spinlock mechanism, used in barriers, has been correctly implemented.
The current implementation rely on the atomicity of the CMPSWAP.W instruction, but this information is missing in the instruction set manual.
Conversely, the manual claims the atomicity for the LDMST and SWAP.W instructions.
Could someone confirm this?
Thanks in advance,
Davide