| 07ba153f | 19-Dec-2025 |
Boyan Karatotev <boyan.karatotev@arm.com> |
feat(locks): make spin_trylock with exclusives spin until it knows the state of the lock
spin_trylock() is meant to be a non-blocking equivalent of spin_lock(). When we have atomics this is easy - t
feat(locks): make spin_trylock with exclusives spin until it knows the state of the lock
spin_trylock() is meant to be a non-blocking equivalent of spin_lock(). When we have atomics this is easy - the `cas` will directly return the state of the lock (held or not held). However, when using exclusives, there's a third state - failed to hold the lock. This happens when the store exclusive couldn't complete the write and bailed. The current implementation will pigeonhole this state into a "not held" state which loses this subtlety and can return with no one holding the lock.
This patch makes it so that the operation is retried until the core is certain it either holds the lock or someone else does. This keeps the nonblocking nature of the trylock call but may incur a delay until the state of the lock settles.
Change-Id: I1a57de22557e13c22f6a6afdef4c28f679dbe7f2 Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|
| 7cb81945 | 09-May-2018 |
Daniel Boulby <daniel.boulby@arm.com> |
Fix MISRA Rule 5.3 Part 4
Use a _ prefix for macro arguments to prevent that argument from hiding variables of the same name in the outer scope
Rule 5.3: An identifier declared in an inner scope sh
Fix MISRA Rule 5.3 Part 4
Use a _ prefix for macro arguments to prevent that argument from hiding variables of the same name in the outer scope
Rule 5.3: An identifier declared in an inner scope shall not hide an identifier declared in an outer scope
Fixed For: make PLAT=fvp USE_COHERENT_MEM=0
Change-Id: If50c583d3b63799ee6852626b15be00c0f6b10a0 Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
show more ...
|