diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2024-02-16 18:55:21 +0100 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2024-05-16 10:49:27 +0200 |
commit | aaaa50ae8753fb7d65e810fa60fbd396f6d9e3d9 (patch) | |
tree | 6ad36db331e45b19b40c38848ac408cb4627e133 /gcc/tree-vectorizer.h | |
parent | 91c6302c8d641990f8977bf8eb5a40370da6efa9 (diff) | |
download | gcc-aaaa50ae8753fb7d65e810fa60fbd396f6d9e3d9.zip gcc-aaaa50ae8753fb7d65e810fa60fbd396f6d9e3d9.tar.gz gcc-aaaa50ae8753fb7d65e810fa60fbd396f6d9e3d9.tar.bz2 |
ada: Implement per-finalization-collection spinlocks
This changes the implementation of finalization collections from using the
global task lock to using per-collection spinlocks. Spinlocks are a good
fit in this context because they are very cheap and therefore can be taken
with a fine granularity only around the portions of code implementing the
shuffling of pointers required by attachment and detachment actions.
gcc/ada/
* libgnat/s-finpri.ads (Lock_Type): New modular type.
(Collection_Node): Add Enclosing_Collection component.
(Finalization_Collection): Add Lock component.
* libgnat/s-finpri.adb: Add clauses for System.Atomic_Primitives.
(Attach_Object_To_Collection): Lock and unlock the collection.
Save a pointer to the enclosing collection in the node.
(Detach_Object_From_Collection): Lock and unlock the collection.
(Finalize): Likewise.
(Initialize): Initialize the lock.
(Lock_Collection): New procedure.
(Unlock_Collection): Likewise.
Diffstat (limited to 'gcc/tree-vectorizer.h')
0 files changed, 0 insertions, 0 deletions