Files
elsid be06c08fdc Use std::atomic to implement OpenThreads::Atomic and AtomicPtr
Current implementation of atomic load is suboptimal that is visible on
ARM: https://godbolt.org/z/r4E7srWcE

This also triggers thread sanitizer warnings like:

```
WARNING: ThreadSanitizer: data race (pid=42478)
  Atomic write of size 4 at 0x7254001afb90 by main thread:
    #0 OpenThreads::Atomic::operator++()      OpenThreads/Atomic:110
    #1 osg::Referenced::ref()                 osg/Referenced:164
    #2 osg::ref_ptr<osg::Drawable>::ref_ptr   osg/ref_ptr:37
    #3 osgUtil::RenderLeaf::RenderLeaf        osgUtil/RenderLeaf:41
    #4 osgUtil::CullVisitor::createOrReuseRenderLeaf
    #5 osgUtil::CullVisitor::addDrawableAndDepth
  Previous read of size 4 at 0x7254001afb90 by thread T112 (mutexes: write M0):
    #0 OpenThreads::Atomic::operator unsigned int() const   OpenThreads/Atomic:225
    #1 osg::Referenced::referenceCount()                    osg/Referenced:97
    #2 Resource::GenericObjectCache<Terrain::ChunkKey>::update  components/resource/objectcache.hpp:82
    ...
    #5 Resource::GenericObjectCache<Terrain::ChunkKey>::update  components/resource/objectcache.hpp:77
```

Remove all related code along with unnecessary mutex based reference
counter.
2026-08-16 21:25:30 +02:00
..
2018-04-23 11:03:37 +01:00
2020-07-21 17:37:24 +02:00